Add curly braces to a switch statement.
int value = 2; switch (value) { case 1: Console.WriteLine(1); break; case 2: Console.WriteLine(2); break; default: Console.WriteLine(0); break; }
A code fix will be presented to you that will transform the code.
int value = 2; switch (value) { case 1: { Console.WriteLine(1); break; } case 2: { Console.WriteLine(2); break; } default: { Console.WriteLine(0); break; } }
TBD