开发者

C# CSearch Tuple list with wildcards

开发者 https://www.devze.com 2023-02-07 14:38 出处:网络
I have a list like this: List<Tuple&l开发者_运维技巧t;int, int, int>> list = new List<Tuple<int, int, int>>();

I have a list like this:

List<Tuple&l开发者_运维技巧t;int, int, int>> list = new List<Tuple<int, int, int>>();

Now I need to remove all the Tuple's in the list with a certain Item1 and Item3, but it doesn't matter what Item2 is.

I have no clue how to acchief this.

Can anyone help me? Thanks!


list.RemoveAll(t => t.Item1 == cond1 && t.Item3 == cond3);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号