I am very new to generics and looking for an example showing how to use the List.Exists delegate. I want to search a particular list to see if an item exists in it. If the item doesn't exist, I want to add it to another list (I'm trying to test for duplicates).
I'm trying to do something like this (I know the syntax is incorrect.):
foreach (myListItem item in myItemList
if (!returnedItemList.Exists(item) // not sure of syntax here
How would I perform this check using the Predicate delegate?