in this case
SortedList<int, string> sl = new SortedList<int, string>() { {
4, "beatrice" }, { 2, "herby" } };
this
Console.WriteLine(sl.FirstOrDefault((KeyValuePair<int,
string> p) => {return
p.Key == 4; }).Value);
is equivelant to this:
Console.WriteLine(sl.FirstOrDefault(p
=> p.Key == 4).Value);
No comments:
Post a Comment