Molly Taylor
1
Q:

nested switch c#

switch(ch1) {
   case 'A':
   Console.WriteLine("This A is part of outer switch" );
   
   switch(ch2) {
      case 'A':
         Console.WriteLine("This A is part of inner switch" );
         break;
      case 'B': /* inner B case code */
   }
   break;
   case 'B': /* outer B case code */
}
1

New to Communities?

Join the community