Open du8die opened 10 years ago
For example, when an expected integer value contains no value ("") a WrongDataFormatException is thrown.
Can a "DefaultValue" decorator be added, where, when a NoValue is encountered, instead of throwing the exception, a default value could be specified?
[CsvColumn(DefaultValue = -1)] public int SomeProperty { get; set; }
I can see the business case for this. If you decide to go ahead and build this, please send me a pull request.
For example, when an expected integer value contains no value ("") a WrongDataFormatException is thrown.
Can a "DefaultValue" decorator be added, where, when a NoValue is encountered, instead of throwing the exception, a default value could be specified?
[CsvColumn(DefaultValue = -1)] public int SomeProperty { get; set; }