It should be rather a list of class objects:
public class Person
{
public string Name { get; set; }
public string SecondName { get; set; }
public string Street { get; set; }
}
List<Person> personList = new List<Person>();
personList.Add(new Person()
{
Name = "Sample",
SecondName = "S",
Street = "4825235186"
});
Now you can have a more dynamic way of having a different number of people on the list. Not a static number. Performing this style will be much more resilient because you can add new fields to the class and access fields list[i].Nameinsteadarray[i][1]
source
share