c# create list with range

90

c# create list with range -

// Adding value to existing list
var list = new List<int>();
list.AddRange(Enumerable.Range(1, x));

// Creating new list
var list = Enumerable.Range(1, x).ToList();

Comments

Submit
0 Comments