Question:What result will you get when you run the following LINQ query in .Net framework 4.0?
var scoreRecords = new[] { new {Name = "Alice", Score = 50},
    new {Name = "Bob" , Score = 40},
    new {Name = "Cathy", Score = 45}
};
var scoreRecordsDict = scoreRecords.ToDictionary(sr =>sr.Name);
Response.Write(scoreRecordsDict["Bob"]);
 

A { Name = Bob} 

B { Name = Bob, Score = 40 } 

C Name = Bob 

D None of thses 

+ Answer
+ Report
Total Preview: 813

Copyright © 2024. Powered by Intellect Software Ltd