Редактирование элемента в списке

Как отредактировать элемент в списке в приведенном ниже коде:

List<Class1> list = new List<Class1>();

int count = 0 , index = -1;
foreach (Class1 s in list)
{
    if (s.Number == textBox6.Text)
        index = count; // I found a match and I want to edit the item at this index
    count++;
}

list.RemoveAt(index);
list.Insert(index, new Class1(...));
19
задан Sachin Joseph 18 May 2016 в 19:59
поделиться