Exporting to CSV with dynamic field type handling
- by serhio
I have to do an export from DB to CSV.
field; fileld; field... etc
Have 3 types of fields: Alpha, Numeric and Bool respresented as "alphaValue",intValue and True/False.
I try to encapsulate this in a fields collection, in order to export if alpha then set "", if Bool=True/False if numeric let as is.
and try to build a CsvField class:
Public Structure?Class CsvField(Of T As ???)
End Structure
Enum FieldType
Alpha
Bool
Numeric
End Enum
any suggestions welcomed.