Except
Coding tip of the day: when you have two lists of strings and want to know the items that are in the first list, but not in the second, use IList.Except:
var firstlist = new List<string>() { "soep", "aap" };
var secondlist = new List<string>() { "soep", "koffie" };
var result = firstlist.Except(secondlist).ToList();
This code returns a list of strings with one item: “aap”
-
Archives
- November 2011 (1)
- October 2011 (1)
- September 2011 (1)
- May 2011 (3)
- March 2008 (4)
-
Categories
-
RSS
Entries RSS
Comments RSS