Null-Coalescing Operator

suggest change

Syntax

It is a shorthand for the conditional expression:

possibleNullObject != null ? possibleNullObject : defaultValue

The left-side operand (object being tested) must be a nullable value type or reference type, or a compile error will occur.

The ?? operator works for both reference types and value types.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents