//Example Mapping Class
public class TestMapper
{
public string Name { get; set; }
public string Birthdate { get; set; }
}
CsvReader csvReader = new CsvReader(); //Trial Mode
//CsvReader csvReader = new CsvReader("place user name here", "place license key here"); //License Mode
//Create a test file
string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "testReader.csv");
File.WriteAllText(filePath, "Name,Birthdate\r\nJohn,5/30/2013");
List<TestMapper> results;
using (FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
{
results = csvReader.CsvStreamToObjectList<TestMapper>(stream);
}
Console.WriteLine(results[0].Name);