If you’re using .Net 3+, you can use Linq.
List<T> withDupes = LoadSomeData();
List<T> noDupes = withDupes.Distinct().ToList();
More Related Contents:
- How to Sort a List by a property in the object
- Convert generic List/Enumerable to DataTable?
- How to remove elements from a generic list while iterating over it?
- How do I clone a generic list in C#?
- ArrayList vs List in C#
- List or IList [closed]
- How to create List of open generic type of class?
- Does .NET have a way to check if List a contains all items in List b?
- List OrderBy Alphabetical Order
- XML Serialize generic list of serializable objects
- Combination of List
- Is it worthwhile to initialize the collection size of a List if it’s size reasonably known?
- How to merge 2 List and removing duplicate values from it in C#
- How to initialize a List to a given size (as opposed to capacity)?
- Does Distinct() method keep original ordering of sequence intact?
- Generic List – moving an item within the list
- How do I check if a given value is a generic list?
- Console.WriteLine and generic List
- Cast Object to Generic List
- How to convert c# generic list to json using json.net?
- How create a new deep copy (clone) of a List?
- Is there a generic constructor with parameter constraint in C#?
- foreach vs someList.ForEach(){}
- Check if a string contains an element from a list (of strings)
- How to remove item from list in C#?
- explicitly cast generic type parameters to any interface
- C# Generic Type Inference With Multiple Types
- Using Linq Except not Working as I Thought
- The component does not have a resource identified by the uri
- Eliminate consecutive duplicates of list elements