C# List Methods

Beginner
6 min read
Updated: Nov 2026
32 method guides
Method index

About This Index

This page is the C# List Methods index. Each row links to a full guide with syntax, parameters, return value, three examples, and FAQs. Examples use small fixed data such as List<int> and List<string>. A List keeps its items in order, so the printed output is the same every time you run the program.

Learn what a List is for on /c-sharp/list. Use this page when you need a specific API such as Add(), Remove(), or FindAll().

Ordered, indexed, and growable.

A List stores items by position (list[0], list[1], ...), allows repeats, and grows as you add. Count is how many items it holds. Capacity is how many it can hold before it must grow.

How to Call a List Method

Every List method is an instance method, so you call it on your list variable:

C#
List<int> numbers = new List<int>();
numbers.Add(30);                               // add one item at the end
numbers.AddRange(new int[] { 10, 20 });        // add many items at once
numbers.Sort();                                // 10, 20, 30
int pos = numbers.IndexOf(20);                 // 1 (or -1 when missing)
int big = numbers.Find(x => x > 15);          // 20, the first item that passes the test
bool gone = numbers.Remove(10);                // remove the first 10

C# List Methods Table

All method guides in this C# tutorial series (32 tutorials), grouped by purpose.

Add / insert

4 methods

Put one item or many items into the list, at the end or at a chosen position.

MethodDescriptionTutorial
Add()Add one item to the end of a List; Count goes up by 1.Try it
AddRange()Add every item of another collection to the end of a List in one call.Try it
Insert()Put one item at a chosen index and move the later items one place to the right.Try it
InsertRange()Insert every item of another collection at a chosen index, in order.Try it

Remove

5 methods

Take items out by value, by position, by a rule, by a range, or empty the whole list.

MethodDescriptionTutorial
Remove()Remove the first item that equals a value; returns true if one was removed.Try it
RemoveAt()Remove the item at a given index and move later items one place to the left.Try it
RemoveAll()Remove every item that passes a test (a predicate); returns how many were removed.Try it
RemoveRange()Remove a block of count items that starts at a given index.Try it
Clear()Remove every item from the List; Count becomes 0 and Capacity stays the same.Try it

Reorder

2 methods

Sort the list or flip it around. Both change the list you call them on.

MethodDescriptionTutorial
Sort()Sort the List in place, using the default order, a Comparison lambda, or an IComparer.Try it
Reverse()Reverse the order of the items in the List, in place; optionally only a range.Try it

Copy / convert

6 methods

Make a new list, an array, a converted list, or a read-only view of the list.

MethodDescriptionTutorial
GetRange()Copy a block of count items, starting at an index, into a new List.Try it
Slice()Copy a block of items into a new List; also what the list[1..4] range syntax calls.Try it
ToArray()Copy the items of the List into a new array of the same length.Try it
CopyTo()Copy items from the List into an existing array, starting at a chosen position.Try it
ConvertAll()Create a new List by converting every item with a function (a Converter).Try it
AsReadOnly()Return a read-only wrapper around the List; it reflects later changes to the source list.Try it

Loop

2 methods

Run code for every item, or get the enumerator that foreach uses behind the scenes.

MethodDescriptionTutorial
ForEach()Run an action (a lambda) once for every item in the List, in order.Try it
GetEnumerator()Return the enumerator that foreach uses to walk through the List one item at a time.Try it

Capacity

2 methods

Reserve space before a big load, or give back unused space after a clean-up.

MethodDescriptionTutorial
EnsureCapacity()Make room for at least a number of items before adding them, so the List grows less often.Try it
TrimExcess()Give back unused room so Capacity moves close to Count (does nothing if the List is nearly full).Try it

Frequently Asked Questions

They are the methods on System.Collections.Generic.List<T>. They add and insert items, remove items, search the list, sort or reverse it, copy it into a new list or array, loop over it, and manage its capacity.
This index lists 32 guides: Add, AddRange, Insert, InsertRange, Remove, RemoveAt, RemoveAll, RemoveRange, Clear, Contains, IndexOf, LastIndexOf, BinarySearch, Exists, Find, FindAll, FindIndex, FindLast, FindLastIndex, TrueForAll, Sort, Reverse, GetRange, Slice, ToArray, CopyTo, ConvertAll, AsReadOnly, ForEach, GetEnumerator, EnsureCapacity, and TrimExcess.
Add, AddRange, Insert, InsertRange, Remove, RemoveAt, RemoveAll, RemoveRange, Clear, Sort, and Reverse change the list in place. Methods such as GetRange, Slice, ToArray, ConvertAll, and FindAll build something new and leave the original list alone.
A predicate is a tiny test function that takes one item and returns true or false. You usually write it as a lambda, such as x => x > 10. Exists, Find, FindAll, FindIndex, FindLast, FindLastIndex, RemoveAll, and TrueForAll all use predicates.
Read the C# List hub first. Then open Add(), Contains(), Remove(), and Sort() from the tables below.

Start with Add()

Put your first item into a list and see how Count and the index work.

Add() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

12 people found this page helpful