M
^MisterJingo^
I saw this code on the net and was curious if anyone could tell me what
the '?' directly proceding the int does?
int? i = null;
object o = i;
if (o == null)
Console.WriteLine("Correct behaviour - you are running a
version from Sept 05 or later");
else
Console.WriteLine("Incorrect behaviour, prior to Sept 05
releases");
The place I found the code didn't explain, and search for int? on
google brings nothing up. Without the '?' in place null can't be
assigned to a value type (int).
Any help would be appreciated.
Chris
the '?' directly proceding the int does?
int? i = null;
object o = i;
if (o == null)
Console.WriteLine("Correct behaviour - you are running a
version from Sept 05 or later");
else
Console.WriteLine("Incorrect behaviour, prior to Sept 05
releases");
The place I found the code didn't explain, and search for int? on
google brings nothing up. Without the '?' in place null can't be
assigned to a value type (int).
Any help would be appreciated.
Chris