i have a two list
List SentList; List MsgList;
both have the same property called MsgID;
MsgList
You could do something like:
HashSet sentIDs = new HashSet(SentList.Select(s => s.MsgID)); var results = MsgList.Where(m => !sentIDs.Contains(m.MsgID));
This will return all messages in MsgList which don't have a matching ID in SentList.
SentList