I\'m using CsvHelper to serialize a class to csv file - until here everything works well.
Now I\'m trying to find a way to convert the class\'s enum properties to th
Add a int property to your TradingCalendarException class that casts back and forth to your custom enum, CalendarExceptionEntityType, like:
public int ExceptionEntityTypeInt {
get { return (int)ExceptionEntityType; }
set { ExceptionEntityType = (CalendarExceptionEntityType)value; }
}
Use Map(m => m.ExceptionEntityTypeInt).Index(0).Name("EXCEPTION_ENTITY_TYPE_INT") instead of your enum converter Map(m => m.ExceptionEntityType).Index(0).Name("EXCEPTION_ENTITY_TYPE").TypeConverter(new MyMapping())