how to find duplicate values in a list c# linq code example
Example: c# linq check for duplicate
var duplicates = list.GroupBy(x => x.Key).Any(g => g.Count() > 1);
var duplicates = list.GroupBy(x => x.Key).Any(g => g.Count() > 1);