c# converting array to list code example
Example 1: c sharp array to list
var list = new List<int>(array);
Example 2: array to list C
using System.Linq;
int[] ints = new [] { 10, 20, 10, 34, 113 };
List<int> lst = ints.OfType<int>().ToList(); // this isn't going to be fast.
OR
List<int> lst = new List<int> { 10, 20, 10, 34, 113 };