nullShortingTermination property

Expression get nullShortingTermination

Returns the expression that terminates any null shorting that might occur in this expression. This may be called regardless of whether this expression is itself null-aware.

For example, the statement a?.b[c] = d; contains the following null-shortable subexpressions:

  • a?.b
  • a?.b[c]
  • a?.b[c] = d

Calling nullShortingTermination on any of these subexpressions yields the expression a?.b[c] = d, indicating that the null-shorting induced by the ?. causes the rest of the subexpression a?.b[c] = d to be skipped.

Implementation

Expression get nullShortingTermination;