我有一个 3 元List<Tuple>
组string, string, string
。
初始化:
List<Tuple<string, string string>> myTupleList = new List<Tuple<string, string, string>>();
我基本上想在其中搜索一个值,Item2
如果找到则删除整个条目。
让我形象化。如果我有:
Item1 | Item2 | Item3
---------------------
"bar" | "foo" | "baz"
---------------------
"cat" | "dog" | "sun"
---------------------
"fun" | "bun" | "pun"
我想做
//pseudocode
myTupleList.Remove("dog" in Item2);
制作清单
Item1 | Item2 | Item3
---------------------
"bar" | "foo" | "baz"
---------------------
"fun" | "bun" | "pun"