I saw the light AnonymousComparer - lambda compare selector for Linq - Alexey Zakharov's Blog

AnonymousComparer - lambda compare selector for Linq

 One guy from Japan created a very cool linq extension. It is called AnonymousComparer, which allows to use Func instead of annoying IEqualityComparer.

    var anonymous = new[] 
{
new { Foo = "A", Key = 10 },
new { Foo = "B", Key = 15 }
};
// true
anonymous.Contains(new { Foo = "dummy", Key = 10 }, a => a.Key);

 

Published Tuesday, January 12, 2010 11:52 AM by brainbox
Filed under: , , ,

Comments

# Graco Nautilus 3 In 1 Car Seat in Rachel

Tuesday, May 04, 2010 8:52 PM by Graco Nautilus 3 In 1 Car Seat in Rachel

I enjoyed reading your weblog and I've recomeneded to my readers here's the link www.graconautilus3in1carseats.com/.../graco-nautilus-3-1-car-seat