How do I map string arrays to a list of objects? A for loop would do it but wondering if there's a more elegant way to do this? Perhaps with Linq?
String arrays:
string[] names = { "john","jane"};
string[] companies = { "company ABC", "" };
string[] affiliations = { "affiliation 1", "affiliation 2" };
Contact:
public class Contact
{
public string Name { get; set; }
public string Company { get; set; }
public string Affiliation { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string State { get; set; }
}