While with goto statement : Goto : Statement C# Examples


C# Examples » Statement » Goto »

 

While with goto statement









    
using  System;

class  MainClass
{
    static  void  Main(string[]  args)
    {
        int  a  =  0;

        while  (a  <  10)
        {
            if  (a  ==  5)
                goto  cleanup;
        }
    cleanup  :

        Console.WriteLine(a);
    }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Statement
» Goto