How to remove from one list all the items in another?

后端 未结 2 1007
耶瑟儿~
耶瑟儿~ 2021-01-25 12:27

I\'m reading a set of rows from a remote database, and a similar set from a local database, and then using RemoveAll to get rid of remote rows that are already present locally..

2条回答
  •  庸人自扰
    2021-01-25 13:33

    One way is this:

        remote_events.RemoveAll(Function(e) local_events.Exists(Function(f) f.Identifier = e.Identifier))
    

提交回复
热议问题