Junior From PDF Collections C# Collections

What is a List<T> in C# and when should you use it?

List<T> is a generic collection in C# that represents a dynamically sized list of elements.

It resides in the System.Collections.Generic namespace and grows or shrinks as

needed.

Use it when:

  • You need a resizable array-like structure
  • You want to perform frequent insertions, deletions, and searches

Example:

List<string> names = new List<string>();

names.Add("Alice");

More from C# Programming Tutorial

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details