CsvHelper icon indicating copy to clipboard operation
CsvHelper copied to clipboard

CsvConverter?

Open wasabii opened this issue 4 years ago • 2 comments

For instance, for JSON you can use a JsonConverter. And it can be applied directly to the type using an attribute.

This seems a good idea for CsvHelper. A custom converter class that can directly deal with the CsvReader and CsvWriter, but be placed on a type directly. There are attributes to change how a class is converted. But they don't let you totally change it by going to the reader and writer directly.

wasabii avatar Oct 30 '21 05:10 wasabii

There is a TypeConverter attribute you can put on a member. Are you saying you want to be able to put that on a class instead of a member?

JoshClose avatar Oct 31 '21 19:10 JoshClose

Yes. The type being converted to CSV.

Also, that can directly deal with the CsvReader and CsvWriter. Not just something that helps convert to a string.

wasabii avatar Oct 31 '21 20:10 wasabii