G
Guest
I came across an idiosyncrasy about nullable value types. According to the
documentation there are two valid syntax for nullable value types. One is
using the Nullable<T> generic and the other using nullable type modifier T?.
However, if you use the HasValue call without first assigning a null value to
a Nullable<T> generic instantiation you will get a compiler error "Use of
unassigned ... variable", whereas the type modifier based instantiation
doesn't give this error!
documentation there are two valid syntax for nullable value types. One is
using the Nullable<T> generic and the other using nullable type modifier T?.
However, if you use the HasValue call without first assigning a null value to
a Nullable<T> generic instantiation you will get a compiler error "Use of
unassigned ... variable", whereas the type modifier based instantiation
doesn't give this error!