/ Published in: C#
If you set the int keyword to be Nullable, then when x is declared there it's set to null. On the second line, the "??" are saying if x is null then assign -1 instead.
Expand |
Embed | Plain Text
Nullable<int> x; int y = x ?? -1;
You need to login to post a comment.
