I\'ve been doing some CSV reading and writing lately, and ran across CsvHelper which is fantastic so far. I\'ve ran into one small problem; I use a custom converter when re
You can do it with a custom type converters (https://github.com/JoshClose/CsvHelper/wiki/Custom-TypeConverter). Just override ConvertToString method.
public class TestConverter : DefaultTypeConverter
{
public override string ConvertToString(TypeConverterOptions options, object value)
{
return base.ConvertToString(options, value);
}
}
and specify converter when mapping:
Map(m => m.PersonId).Index(0).TypeConverter<TestConverter>();