Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# add multiple items to list

List<Person> listofPersons = new List<Person>();
listofPersons.AddRange(new List<Person>
{
    new Person("John1", "Doe" ),
    new Person("John2", "Doe" ),
    new Person("John3", "Doe" ),
 });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #multiple #items #list
ADD COMMENT
Topic
Name
3+7 =