1.

What's Different About Switch Statements In C#?

Answer»

No FALL-throughs ALLOWED. UNLIKE the C++ switch statement, C# does not support an explicit fall through from one case label to ANOTHER. If you want, you can use goto a switch-case, or goto default.
case 1:
cost += 25;
break;
case 2:
cost += 25;
goto case 1;

No fall-throughs allowed. Unlike the C++ switch statement, C# does not support an explicit fall through from one case label to another. If you want, you can use goto a switch-case, or goto default.
case 1:
cost += 25;
break;
case 2:
cost += 25;
goto case 1;



Discussion

No Comment Found