In C#, is there a difference between default(Nullable<long>) (or default(long?)) and default(long) ?
Long is just an example, it can be any other struct 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.
Well yes. The default value of a nullable or other reference type is
nullwhile the default value for alongor other value type is0(and any other members set to their defaults).In this case: