Remove instances from a list by using LINQ or Lambda?

前端 未结 7 1843
囚心锁ツ
囚心锁ツ 2021-02-05 03:26

Now I come a stage to get all my data as a list in cache(objects) and my next thing I have to do is to remove some instances from the list.

Normally, I would do removing

7条回答
  •  没有蜡笔的小新
    2021-02-05 03:55

    If I get the question correctly, to produce a unique set from two List.

    For this, you can use the following

    List list1; List list2;

    List list3 = list1.Except(list2)

    The list3 will contain unique items.

提交回复
热议问题