JoshClose/CsvHelper — Issue #26: Populate properties that contain custom classes
Author: JoshClose
Created: 2012-03-06 14:24:26+00:00
State: open

A CSV file may have a bunch of different data that is flat. If we use Person as an example, a person may have a work address, a mailing address, etc, as a part of the data. The Person custom class object may represent this data as single properties of type Address for MailingAddress, WorkAddress, etc.

ex:
```
public class Person
{
public string Name { get; set; }
public Address MailingAddress { get; set; }
public Address WorkAddress { get; set; }
}

public class Address
{
public string StreetAddress { get; set; }
public string City { get; set; }
public string State { get; set; }
public string Zip { get; set; }
}
```

CSV file:

Name,MailingStreetAddress,MailingCity,MailingZip,WorkStreetAddress,WorkCity,WorkState,WorkZip