what is fastest way to remove duplicate values from a list.
Assume List So I am interesting in
You can use this extension method for enumerables containing more complex types:
IEnumerable distinctList = sourceList.DistinctBy(x => x.FooName);
public static IEnumerable DistinctBy(
this IEnumerable source,
Func keySelector)
{
var knownKeys = new HashSet();
return source.Where(element => knownKeys.Add(keySelector(element)));
}