Answers for "how to add to a list only items that are not already in the list c#"

C#
0

how to add to a list only items that are not already in the list c#

CurrentCollection.AddRange(NewItems.Where(x => !CurrentCollection.Any(y => y.valueToCheck == x.valueToCheck)));
Posted by: Guest on October-19-2020

Code answers related to "how to add to a list only items that are not already in the list c#"

C# Answers by Framework

Browse Popular Code Answers by Language