Answers for "switch case with variable c#"

C#
0

c# switch

int caseSwitch = 1;	
switch (caseSwitch)
      {
          case 1:
              Console.WriteLine("Case 1");
              break;
          case 2:
              Console.WriteLine("Case 2");
              break;
          default:
              Console.WriteLine("Default case");
              break;
      }
Posted by: Guest on November-24-2020

C# Answers by Framework

Browse Popular Code Answers by Language