[C# Tips] Null Coalescing Operator (??)(technotes.towardsjob.com)
submitted by
nitinkumarbe(175) 2 years ago
Purpose : It returns the left-hand operand if it is not null; otherwise it returns the right operand. Eg :
int y = x ?? -1;
// y = x, unless x is null, in which case y = -1.
Remarks :
Equivalent of
If [...]
|category: C#
|Views: 11
tags:
C# another
Everyones tags:
Your Tags: