title: c# : how to read from specific index in List<person>
body: <p>I have a class of persons and list collection as list contains all the values of person class
  such as :</p>
  
  <p>List ilist has 2 values [0]={firstname,lastname} . [1]={firstname2,lastname2}</p>
  
  <p>now when i am iterating into the list i am able to print the list but i want to change the value of some parts of my list e.g in index 1 if i want to change the value of firstname2 to firstname3 i am not able to do it . Can anyone tell me how to print the list and then on that index changing any value of the index , i.e. firstname and secondname variable in the person class so that i can update my values
  Thanks </p>