Possible duplicate:What do the two question marks in C # mean?
I just came across the code below and am not quite sure what that means and cannot google, because google skips ??
??
int? x = 32; int y = x ?? 5;
Is the second line some kind of if else expression, which means ??
He called the null-coalescing statement .
If the value to the left of ??is equal null, use the value to the right of ??, otherwise use the value of the left hand.
null
Deployed:
y = x == null ? 5 : x
or
if(x == null) y = 5 else y = x
?? . , :
int? x = null; int? y = null; int? z = null; y = 12; int? a = x ?? y ?? z;
a 12, y - .
a
y
Yes. This is an if else statement. Check out this URL http://www.webofideas.co.uk/Blog/c-sharp-double-question-mark-syntax.aspx