Test if all values in a list are unique

bool isUnique = theList.Distinct().Count() == theList.Count();

Leave a Comment