luni, 25 august 2014

?? Operator (C# Reference)

The ?? operator,also called the null-coalescing operator,returns the left-hand operand if it is not null, or else it returns the right operand.

Example

 // y = x, unless x is null, in which case y = 0.
int y = x ?? 0;

Niciun comentariu:

Trimiteți un comentariu