lordstyx
lordstyx

Reputation: 785

C# CSearch Tuple list with wildcards

I have a list like this:

List<Tuple<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!

Upvotes: 0

Views: 592

Answers (1)

Femaref
Femaref

Reputation: 61437

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

Upvotes: 2

Related Questions