code_junkie

Select Distinct from a list of IEnumerable<T> in .NET 2.0

Nov 12th, 2011
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. Dictionary<object, object> list = new Dictionary<object, object>();
  2. foreach (object o in enumerable)
  3. if (!list.ContainsKey(o))
  4. {
  5. // Do the actual work.
  6. list[o] = null;
  7. }
Add Comment
Please, Sign In to add comment