0

Given the following record definition

[DelimitedRecord(",")]
public class Line
{
    public string FirstName;

    public string LastName;
}

And the following code to import the CSV

var engine = new FileHelperEngine<Line>();
// Ignore header line
engine.Options.IgnoreFirstLines = 1;
var records = engine.ReadFileAsList(csvFile);

I would like to be able to read both of these CSV files with the same result.

CSV in same order as record definition

FirstName,LastName
John,Doe

CSV with different order, with same header names however

LastName,FirstName
Doe,John

1 Answer 1

1

The current version of the library don't support that feature

Is on the pending list for the next big release

https://github.com/MarcosMeli/FileHelpers/issues/122

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, that's great news.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.