I'm parsing a tab delimited file using FileHelpers.
The null values are being ignored after using the FieldNullValue
attribute and I am ending up with the error log
can't be found after the field 'filed name' at line 4 (the record has less fields, the delimiter is wrong or the next field must be marked as optional).
Class definition of delimiter:
[DelimitedRecord("\t")]
Fields are all strings with the same attributes:
[FieldTrim(TrimMode.Both)]
[FieldNullValue("NULL")]
[FieldQuoted('"', QuoteMode.OptionalForRead, MultilineMode.AllowForRead)]
public String initials;
Looking at the imported file in a hex editor i can see back to back tab chars (09 09) which would I assume be a null field.
As you can see in the screen capture fields 5 & 9 are null. These get ignored by the filehelper parser. Does anyone know why?