Remove Duplicate item from list based on condition c# code example
Example 1: c# list remove item based on property duplicate
fooArray.GroupBy(x => x.Id).Select(x => x.First());
Example 2: remove from list based on condition c#
List<Int32> prods = GetListFromSever();
prods.RemoveAll(s => s.ID == 1)