if (myList.GroupBy(i => i.ID).Where(g => g.Count > 1).Select(g => g.Key).Count() > 0) { throw ...
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)