This post will discuss how to convert an array to a list in C#.

1. Using Enumerable.ToList() method

The simplest solution is to call the Enumerable.ToList() method from System.Linq namespace which creates a List<T> from an IEnumerable<T>. It returns a List<T> that contains elements from the input sequence.

Download  Run Code

2. Using List Constructor

We can also use the constructor of List<T> which accepts IEnumerable<T> as an argument and initializes a new instance of the List<T> class that contains elements copied from the specified collection.

Download  Run Code

3. Using List.AddRange() method

Finally, we can call the AddRange() method, which adds the specified collection elements at the end of the List.

Download  Run Code

That’s all about converting an array to a list in C#.