change item in list c# code example
Example 1: c# edit element in list
var index = list.FindIndex(c => c.Number == someTextBox.Text);
list[index] = new SomeClass(...);
Example 2: how to edit a c# list
list[indexToEdit] = newItem;
var index = list.FindIndex(c => c.Number == someTextBox.Text);
list[index] = new SomeClass(...);
list[indexToEdit] = newItem;