user image

Gagan Mishra

Job Interview Skills
English
2 years ago

Question 597. What's Different About Switch Statements In C#?

user image

Abhishek Mishra

2 years ago

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;

user image

Abhishek Mishra

2 years ago

A switch statement causes control to transfer to one labeled-statement in its statement body, depending on the value of expression . The values of expression and each constant-expression must have an integral type. A constant-expression must have an unambiguous constant integral value at compile time.

Recent Doubts

Close [x]