Q51
What will be the output of the following C# code snippet? class Program static void Main(string[] args) string[] strs = ".com", ".net", "facebook.com", "google.net", "test", "netflix.net", "hsNameD.com" ; var netAddrs = from addr in strs where addr.Length > 4 && addr.EndsWith(".net", StringComparison.Ordinal) select addr; foreach (var str in netAddrs) Console.WriteLine(str); Console.ReadLine();
A.
Compile time error
B.
Run time error
C.
facebook.com
netflix.net
google.net
netflix.net
google.net
D.
google.net
netflix.net
Answernetflix.net
Answer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board