Tsallaka zuwa abun ciki
Justice Tech School

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

Which property gives the size?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.