Remove items from list that appears in another list by ID

I tried many options and stopped on this one:

lst1.RemoveAll(itemFromLst1 => lst2.Any(itemFromLst2 => itemFromLst2.ID == itemFromLst1.ID));

Comments

Popular posts from this blog

NodeJS modules shrink