Member predicate SwitchStmt::getCase
Gets the i
th case
statement in the body of this switch
statement.
Example:
switch (x) {
case "abc": // i = 0
return 0;
case int i when i > 0: // i = 1
return 1;
case string s: // i = 2
Console.WriteLine(s);
return 2;
default: // i = 3
return 3;
}
Note that this reorders the default
case to always be at the end.