Anyone have a quick method for de-duplicating a generic List in C#?
Simply initialize a HashSet with a List of the same type:
var noDupes = new HashSet(withDupes);
Or, if you want a List returned:
var noDupsList = new HashSet(withDupes).ToList();