I have two classes which look like this:
public class SortedUser
{
public string Email { get; set; }
public List<IpInfo> IPAndCountries = new List<IpInfo>();
}
And then:
public class IpInfo
{
public string Ip { get; set; }
public string Hostname { get; set; }
public string City { get; set; }
public string Region { get; set; }
public string Country { get; set; }
public string Loc { get; set; }
public string Org { get; set; }
public string Postal { get; set; }
}
I would like to create a reasonably readable file (txt, csv or even xls/xlsx) from this which could look something:
User1 Email
IP1 Country City
IP2 Country City
IP3 Country City
and so on...
User2 Email
IP1 Country City
IP2 Country City
IP3 Country City
and so on...
User3 Email
IP1 Country City
IP2 Country City
IP3 Country City
and so on...
What is the easiest way to perform this? Can someone help me out?
P.S. It can even be a PDF file (which would be the best).