Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #list #range
ADD COMMENT
Topic
Name
9+5 =