Removing last field in a record, then reading all records generates an exception
engine.Options.RemoveField("Digitale")
Dim records = engine.ReadFile(fn)
FileHelpers.FileHelpersException: Line: 1 Column: 207. Delimiter ';' not found after field 'CDC'
(the record has less fields, the delimiter is wrong or the next field must be marked as optional).
When removing any field from the Fields array of RecordInfo should reset the lastField property of the last item in the array:
// in Core/RecordInfo.Factory.cs
public void RemoveField(string fieldname)
{
var index = GetFieldIndex(fieldname);
Fields[index] = null;
Fields = Array.FindAll(Fields, x => x != null);
Fields[Fields.Length - 1].IsLast = true; // HERE <====
}