Apparently Nullable<int> and int? are equivalent in value. Are there any reasons to choose one over the other?
Nullable<int> a = null;
int? b = null;
a == b; // this is true
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 difference.
int?is just shorthand forNullable<int>, which itself is shorthand forNullable<Int32>.Compiled code will be exactly the same whichever one you choose to use.