【问题标题】:C# CSearch Tuple list with wildcards带有通配符的 C# CSearch 元组列表
【发布时间】:2011-01-28 22:35:34
【问题描述】:

我有一个这样的列表:

List<Tuple<int, int, int>> list = new List<Tuple<int, int, int>>();

现在我需要删除列表中具有某个 Item1 和 Item3 的所有 Tuple,但 Item2 是什么并不重要。

我不知道如何实现这一点。

谁能帮帮我? 谢谢!

【问题讨论】:

    标签: c# list wildcard tuples


    【解决方案1】:
    list.RemoveAll(t => t.Item1 == cond1 && t.Item3 == cond3);
    

    【讨论】:

    • 你的意思是我之前在里面的东西吗?是的,我将语法与其他一些 RemoveAll 方法混淆了。
    猜你喜欢
    • 2016-12-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-18
    • 1970-01-01
    • 2021-09-08
    相关资源
    最近更新 更多