Home > Articles > Programming > C#

  • Print
  • + Share This
From the author of

From the author of

Labels

Labels are program elements that simply identify a location in a program. Their only practical use is to support the goto statement. The goto statement allows program control to jump to the place where a label is defined. A label is any valid identifier followed by a colon (not a semicolon). Here are two examples:

loop:    // a label named "loop"
jumphere:  // a label named "jumphere"
  • + Share This
  • 🔖 Save To Your Account