Possible Duplicate:
What do two question marks together mean in C#?
I just came across the code below and not really sure what it means and can’t google it because google omits the ??
int? x = 32;
int y = x ?? 5;
Is the second line some sort of if else statement, what does the ?? mean
It’s called the null-coalescing operator.
If the value to the left of the
??isnull, then use the value to the right of the??otherwise use the left hand value.Expanded out:
or