?? Operator (C# Reference): "?? Operator (C# Reference)
The ?? operator is called the null-coalescing operator and is used to define a default value for a nullable value types as well as reference types. It returns the left-hand operand if it is not null; otherwise it returns the right operand."
eg:
varXThatNotAcceptsNull = varYWhichMayContainNull ?? VarZThatHasADefaultValueForVarX ;
No comments:
Post a Comment