When I declare an int as nullable
int
int? i=null;
Does i here become a reference type?
i
No, a nullable is a struct. What is happening is that the nullable struct has two values:
int?
DateTime
DateTime?
HasValue
When you set the value of the data type, the struct changes HasValue to true.
Nullable types (C# Programming Guide)
1.4m articles
1.4m replys
5 comments
56.9k users