- Define the grammar for the new ternary operator ?:: in the C# language specification :
switch-expression: null-coalescing-expression null-coalescing-expression ?: bracketed-argument-list : bracketed-argument-list bracketed-argument-list: [ argument-list ]
- Define the compile time semantics associated with the new operator and the switch expression in C# language specification:
A switch expression of the form expr ?: [label1, label2, ..., labeln] : [val1, val2, ..., valn, valn+1] has the following compile time semantics:
- The governing type of the switch expression is established by the same set of rules as the governing type of a switch statement.
- The first bracketed argument list [label1, label2, ..., labeln] must contain ...