News for hackers. Stuff that matters.
Re:Don't return null; use a tail call by arethuza on Tuesday January 10, 2012 @09:53AM (#3447103)
Why don't you use int? rather than Nullable<int> - aren't they equivalent?
Re:Don't return null; use a tail call by lallysingh on Tuesday January 10, 2012 @09:58AM (#3447117)
The point is, all values of the int are available. Null is stored somewhere outside the underlying int.
Re:Don't return null; use a tail call by arethuza on Tuesday January 10, 2012 @10:04AM (#3447144)
It was just a question about the syntax used - why type Nullable<int> when there is direct syntactical support in C# for nullable types - in this case you could simply type int? rather than Nullable<int>
Re:Don't return null; use a tail call by endianswap on Tuesday January 10, 2012 @11:14AM (#3447455)
At the very least Nullable<T> is a lot friendlier to search than T? if you want to learn more on the subject.
Re:Don't return null; use a tail call by bfung on Tuesday January 10, 2012 @01:57PM (#3448387)
not everyone is familiar with C#, and Nullable<int> conveys better meaning in writing to that kind of audience.
Re:Don't return null; use a tail call by troygoode on Tuesday January 10, 2012 @10:39AM (#3447268)
int? is syntactic sugar for Nullable<int>, which didn't seem worth getting into :-)