Csvhelper: Documentation would be more helpful if it mentioned what textReader is/does

Created on 26 Nov 2013  Â·  5Comments  Â·  Source: JoshClose/CsvHelper

In the documentation at http://joshclose.github.io/CsvHelper/ , you have the following two lines:

var csv = new CsvReader ( textReader );
var records = new CsvReader();

In terms of the documentation being a quickstart guide, it would be helpful if you included the line for the creation of textReader or described more obviously what it does.

documentation

Most helpful comment

I'm probably going to have textReader link out to the docs. https://msdn.microsoft.com/en-us/library/system.io.textreader(v=vs.110).aspx

All 5 comments

TextReader or System.IO.TextReader is a type built into the .NET framework that all the readers inherit from. There are many ways that it could be created from. http://msdn.microsoft.com/en-us/library/system.io.textreader(v=vs.110).aspx

Are you expecting the example to include something like this?

C# var stream = File.OpenRead( myPath ); var reader = new StreamReader( stream ); var csv = new CsvReader( reader );

I guess I'm expecting people that are using this library to have done some IO in .NET at some point before using it.

Hi,

Yep something like that would be fine.

I'm new to IO in .net (java programmer!), and anything that helps someone
get started quicker is a good thing I think :-)

On Sat, Nov 30, 2013 at 4:00 PM, Josh Close [email protected]:

TextReader or System.IO.TextReader is a type built into the .NET
framework that all the readers inherit from. There are many ways that it
could be created from.
http://msdn.microsoft.com/en-us/library/system.io.textreader(v=vs.110).aspx

Are you expecting the example to include something like this?

var stream = File.OpenRead( myPath );var reader = new StreamReader( stream );var csv = new CsvReader( reader );

I guess I'm expecting people that are using this library to have done some
IO in .NET at some point before using it.

—
Reply to this email directly or view it on GitHubhttps://github.com/JoshClose/CsvHelper/issues/206#issuecomment-29546222
.

I don't think I'm going to add anything about that in for a couple of reasons.

  1. It's basic .NET IO.
  2. It's built into the framework.
  3. There are many other things that would have to be documented also to be consistent. i.e. strings, arrays, etc
  4. Visual Studio gives you the ability to find information about the type that it takes.

I understand that you're just learning, but it's more of a language/framework feature, than anything specific to CsvHelper. If you didn't know what attributes were and a library used them, I don't think the library should have documentation on what attributes are and how they work.

Just throwing out I didn't know what textReader was either in the quick start. Had to google what it was and it landed me here. Makes the quick start less useful, nothing more frustrating than the easiest thing being difficult.

I'm probably going to have textReader link out to the docs. https://msdn.microsoft.com/en-us/library/system.io.textreader(v=vs.110).aspx

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DmitryEfimenko picture DmitryEfimenko  Â·  3Comments

hellboy81 picture hellboy81  Â·  6Comments

mabead picture mabead  Â·  3Comments

RizwanAhmedJutt picture RizwanAhmedJutt  Â·  5Comments

shinriyo picture shinriyo  Â·  6Comments