Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C Sharp Programming/Keywords/goto

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Keywords enum __TOC__ The goto keyword returns the flow of operation to the label which follows it. Labels can be created by putting a colon after any word. e.g. thelabel: // This is a label System.Console.WriteLine("Blah blah blah"); goto thelabel; // Program flow returns to thelabel The use of goto is very controversial, because, when used frivolously, it creates code that jumps from place to place and is disorganized and hard to read. It is rarely even necessary because the same thing can often be accomplished with a more organized for loop or while loop.