Switch Statement syntax in C# .NET
switch (expression)
{
case constant-expression:
statement
jump-statement
[default:
statement
jump-statement]
}
An example is here...
switch (i) {
case 0:
CaseZero();
goto case 1;
case 1:
CaseZeroOrOne();
goto default;
default:
CaseAny();
break;
}
That's pretty simple C# syntax for Switch-case statements.
Technorati Tags: C# .NET
No comments:
Post a Comment