Im trying to work harder with those constructions but definitelly I dont see them deductive. I already made a code like above when I got 2 lists of the same kind ( List ) for example:
listA.RemoveAll(x => !listB.Any(y => y.ID == x.ID));
Now, supouss that I have the same lists but they are from different collections ( got different attributes into each member of the list) and I would like to delete all the members from list A that doesn’t have the same ID from the elements into list B.
Both collections got an int ID attribute to be compared.
Instead of deleting from list you can select valid items as bellow: