List elements can be accessed and modified like arrays with a subscript operator and index, as long as the index is within the List class's range. However, the List class has a variety of methods that extend its functionality, such as adding, inserting, and removing elements.
Sticking with the questPartyMembers list, let's add a new member to the team:
questPartyMembers.Add("Craven the Necromancer");
The Add method appends the new element at the end of the list, which brings the questPartyMembers count to four and the element order to the following:
{ "Grim the Barbarian", "Merlin the Wise", "Sterling the Knight",
"Craven the Necromancer"};
To add an element to a specific spot in a list, we can pass the Insert method the index and the value that we want to add:
questPartyMembers.Insert(1, "Tanis the Thief");
When an element is inserted at a previously-occupied index, all the elements...