When I declare an int as nullable
int? i=null;
Does i here become a reference type?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, a nullable is a struct. What is happening is that the nullable struct has two values:
intforint?,DateTimeforDateTime?, etc.).HasValueis the property.)When you set the value of the data type, the struct changes
HasValueto true.Nullable types (C# Programming Guide)