What is the quickest way to remove one array of items from another?

前端 未结 3 1832
野的像风
野的像风 2020-12-31 03:45

I have two arrays of strings:

 string[] all = new string[]{\"a\", \"b\", \"c\", \"d\"}

 string[] taken = new string[]{\"a\", \"b\"}

I want

3条回答
  •  一向
    一向 (楼主)
    2020-12-31 04:25

    You are using LINQ Except for it, like all.Except(taken).

提交回复
热议问题