I have created a list of tuples:
static List<Tuple<string, string>> Alt;
The user adds to this list:
Alt.Add(new Tuple<string, string>(tbAlt.Text, ""));
What is the best way to find a Tuple based on the first string (i.e. the tbAlt.Text ) and either delete it or modify the second string?
I am new to using Tuples and lists :)
Many thanks for any help!
It appears the first string must be unique or you would not find a (singular)
Why are you using List<Tuple<string, string>>
?
Why not Dictionary<string,string>
?
Dictionary<TKey, TValue>.ContainsKey
is very very fast.
Dictionary.ContainsKey
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With