I have two list with the next values:
List A:
- ‘9999’
- ‘1111’
List B:
- ‘1111’
I want to remove from List A the element who matches with anyone of the list B. In this case
list A (or a new list) should have:
List C:
- ‘9999’
I was looking for an optimus way of do it but I can’t find anyone. Any suggestion?
>Solution :
I am not sure if this is what you are looking for:
List<Integer> result = listA.Except(listB).ToList();