c# list add at index code example
Example 1: how to add to a list c#
var list = new List<string>();
list.Add("Hello");
Example 2: how to insert into a list c#
var words = new List<string>();
// Warning: insterting into a List can be very slow
// Insert a string at index 3
names.Insert(3, "Hello!");