Thursday, September 27, 2007
int? thing = GetSomethingOrOther();
posted by Simon at 6:38 PM. Permalink
You should check out "??", its even better...int? a = null;int b = a ?? 0;
Oddly, I came across ?? two years ago. I was apparently quite impressed with it then. I don't know why I didn't discover int? sooner. Thanks for commenting.
Nullable types are a new addition to the C# 2.0 compiler. I quite like them.
Yes "new" as in about 2-3 years old.. LOL
Post a Comment
Create a Link
<< Home