I'm using CsvHelper to write into csv file.
I want to write ENUM as int
, not string
.
What is the eassiesest way to do this?
Assuming I have some types of ENUM
's, not just one.
public enum EStatus
{
ES_FAILED = 0,
ES_DONE,
ES_UNKNOWN
}
Map(m => m.status).Index(0)
output:
ES_DONE
Expected:
1