I have two lists
List list1 = new List(); List list2 = new List();
I want remove all elements from li
If you want to remove a list of objects (list2) from another list (list1) use:
list2
list1
list1 = list1.Except(list2).ToList()
Remember to use ToList() to convert IEnumerable to List.
ToList()
IEnumerable
List