Lists in C#
Unlike Arrays, Lists are dynamic. They can grow or shrink in size automatically.
Creating a List
You need to use using System.Collections.Generic;.
csharp
List
names.Remove("John"); Console.WriteLine(names.Count);
Benefits
- Dynamic sizing.
- Built-in methods for sorting and searching.