how to edit a c# list

C#
list[indexToEdit] = newItem;
Source

Also in C#: