c# - Edit a List item -
c# - Edit a List<Tuple> item -
with list<string> can edit item this:
var index = list.findindex(s => s.number == box.text); list[index] = new string; but, how apply on list<tuple<string, string>> example?
var tuple = list.find(s => s.item1 == box.text); //assuming you're searching first string, can alter predicate anyway. tuple = new tuple<string, string>(new string, tuple.item2);
as mentioned in other answer, can of course of study utilize index too, can find object , update it, should work well.
c# list tuples
Comments
Post a Comment