I'm trying to set the
FieldNullValue for a
DateTime variable in a
FileHelpers class to the Today value (so if when I read the .csv there is no entry, it defaults to Today's date). The code I've tried is:
[FieldOptional] [FieldNullValue(DateTime.Today)] public DateTime DATE;
However I get the error
"Error 1 An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type".
Please can someone explain what I'm doing wrong?