New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting FieldHeaders #737

Closed
Codehhh opened this Issue Aug 25, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@Codehhh

Codehhh commented Aug 25, 2017

I just started using your package today but I can't figure out how to easily get the FieldHeaders.

I see some issues that include csv.FieldHeaders but I can't seem to find that in the code or any documentation. What is the simplest way for me to get the FieldHeaders using your library?

I'm currently using v3.0.0-chi06 and netcore v2.0.0

Thanks.

@jamesbascle

This comment has been minimized.

Contributor

jamesbascle commented Aug 25, 2017

@Codehhh

This comment has been minimized.

Codehhh commented Aug 25, 2017

@jamesbascle

Sorry, I forgot to include the version I was using in my original post but I ninja edited after realizing.

I'm using v3.0.0-chi06.

My code currently looks like the following:

var csv = new CsvReader( textReader );
csv.Read();
csv.ReadHeader();
var header = csv.FieldHeaders; // Doesn't exist?
var records = csv.GetRecords<MyClass>();
@JoshClose

This comment has been minimized.

Owner

JoshClose commented Aug 25, 2017

var header = csv.Context.HeaderRecord;

@JoshClose JoshClose added the question label Aug 25, 2017

@Codehhh Codehhh closed this Aug 25, 2017

@Codehhh

This comment has been minimized.

Codehhh commented Aug 25, 2017

Thank you!

@JoshClose

This comment has been minimized.

Owner

JoshClose commented Aug 26, 2017

No problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment