CodeCopy

September 18, 2009

LINQ MADNESS !!

Filed under: c# — mazzoo @ 08:17
Tags: , ,

Get a list over CountryName doubles in a list of Countries.

List<CountryInfo> test = (from cX in countryInfoList
                        from cY in countryInfoList
                        where cX != cY && cX.CountryName.ToLower() == cY.CountryName.ToLower()
                        select cX ).ToList();

This is almost too simple :)

Technorati Tags: ,,

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.