Sponsored Ad

Saturday, September 26, 2009

goto Statement in C#

The goto account is the a lot of archaic C# jump statement. It transfers ascendancy to a labeled statement. The characterization have to abide and have to be in the ambit of the goto statement. More than one goto account can alteration ascendancy to the aforementioned label.

if (number % 2 == 0)
   goto Even;
   Console.WriteLine("odd");
   goto End;
Even:
   Console.WriteLine("even");
End:;

0 comments:

Post a Comment

Sponsored Ad

More Related Articles

Website Update

Followers