In .NET 4.0 if you create a Calendar and you look at the SelectedDate field it is of type "DateTime?". What's the deal with the ? at the end of the type?
+4
A:
? at the end means it's nullable, as in, the control may not have a SelectedDate at all.
JeffN825
2010-09-27 14:22:06
+2
A:
DateTime?
means Nullable<DateTime>
that's meaning that this property can hold null
. Meanwhile just DateTime
- cannot.
See more about Nullable Types on MSDN
abatishchev
2010-09-27 14:23:15