Given the following C# code:
List<string> source = new List<string>();
IEnumerable<string> values = from value in source select value;
Will values ever be null or will it always return an empty sequence?
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.
Yes it CAN return null if you have an extension method defined in your code somewhere like the following:
Otherwise no; it will return an empty sequence.