using System;
using ChoETL;
public class Program
{
public static void Main()
foreach (dynamic rec in ChoCSVReader<EmployeeRec>.LoadText(csv)
.WithFirstLineHeader()
.WithField(c => c.Id)
.WithField(c => c.Name)
.ThrowAndStopOnMissingField(false)
)
Console.WriteLine($"Id: {rec.Id}");
Console.WriteLine($"Name: {rec.Name}");
}
public class EmployeeRec
public int Id
get;
set;
public string Name
public string Address
static string csv = @"Id,Name
1,Tom
2,Carl
3,Mark";