I am using Filehelpers to export a collection of a class to a csv file.
The class is used to store user info and has 5 fields, i want to export different fields in different circumstances. so the collection will either be all new users where i only have values for say fields 1,2,3 or deleted users where only fields 1,4,5 have values. I m declaring the fields as optional, however when i call write file all fields are included in the output.
Does anyone have any idea on teh best way to do this, im a bit stumped.
[FieldOptional()]
[FieldQuoted('"', QuoteMode.AlwaysQuoted, MultilineMode.NotAllow)]
public String JobTitle;
[FieldOptional()]
[FieldQuoted('"', QuoteMode.AlwaysQuoted, MultilineMode.NotAllow)]
public String Department;