Can somebody provide a example of this?
I have tried null,string.Empty and object initialization but they don’t work since default value has to be constant at compile time
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.
Just use the null coalescing operator and an instance of empty
List<string>The problem with this is that if “param2” is null and you assign a new reference then it wouldn’t be accessible in the calling context.