List<T>
List<T> grows automatically. Add, Remove, Contains, IndexOf, Insert and Sort.
Example
var l = new List<string> { "b", "a" };
l.Add("c");
l.Insert(0, "z");
l.Remove("b");
l.Sort();
Console.WriteLine(string.Join(",", l));
Console.WriteLine($"{l.Count} {l.Contains("a")}");Exercise
Add an item.
l.("x")
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.