using System.Collections.Generic
//type is your data type (Ej. int, string, double, bool...)
List<type> newList = new List<type>();
IList<int> newList = new List<int>(){1,2,3,4};
var list = new List<string> {
"test1",
"test2",
"test3"
};
var list = new List<string> { "test1", "test2", "test3" };
C# By Magnificent Mamba on Dec 23 2019
IList<int> newList = new List<int>(){1,2,3,4};
// List with default capacity
List<Int16> list = new List<Int16>();
// List with capacity = 5
List<string> authors = new List<string>(5);
string[] animals = { "Cow", "Camel", "Elephant" };
List<string> animalsList = new List<string>(animals);