- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

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"]);

1.{ Name = Bob}

2.{ Name = Bob, Score = 40 }

3.Name = Bob

4.None of the above

Posted Date:-2022-08-16 05:07:33


More MCQS Questions and answers

Search