Reads CSV data into the DataTable using the specified TextReader.

Namespace: System.Extensions.Data
Assembly: System.Extensions (in System.Extensions.dll) Version: 0.0.0.5 (0.0.0.5)

Syntax

C#
public static void ReadCsv(
	this DataTable table,
	TextReader reader,
	bool hasHeader
)
Visual Basic
<ExtensionAttribute> 
Public Shared Sub ReadCsv ( 
	table As DataTable,
	reader As TextReader,
	hasHeader As Boolean
)
Visual C++
public:
[ExtensionAttribute]
static void ReadCsv(
	DataTable^ table, 
	TextReader^ reader, 
	bool hasHeader
)
F#
static member ReadCsv : 
        table : DataTable * 
        reader : TextReader * 
        hasHeader : bool -> unit 

Parameters

table
Type: System.Data..::..DataTable
The table to read the CSV data into.
reader
Type: System.IO..::..TextReader
The reader from which to read the data.
hasHeader
Type: System..::..Boolean
Whether the CSV document has a header row.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataTable. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also