List listofPersons = new List(); listofPersons.AddRange(new List { new Person("John1", "Doe" ), new Person("John2", "Doe" ), new Person("John3", "Doe" ), });