tags:

views:

27

answers:

1

How can i right this in method Expression!

var query = from l in list where l.Key == "M"

select new { Value = l, Length = l.Length };

+6  A: 

You want to turn it into a sequence of extension method calls?

var query = list.Where(l => l.Key == "M")
                .Select(l => new { Value = l, Length = l.Length });
Tim Robinson
@Tim fast typing. glad I refreshed before posting mine. Feel stupid when someone has same answer but ahead of me.
spinon