C# Class CrossStitchCreator.CSVReader

A class for reading .CSV files
Exibir arquivo Open project: adrianj/CrossStitchCreator Class Usage Examples

Public Methods

Method Description
CSVReader ( Stream stream ) : System

Initialises a new CVSReader around the given Stream.

CSVReader ( string filename ) : System

Initialises a new CSVReader and sets up a FileStream on the given filename. Will throw some kind of Exception if the filename is no good.

ReadFile ( ) : string[][]

Reads the file, and returns an array of strings organised [Column][Row]

Private Methods

Method Description
countRows ( ) : void

Reads through the stream once and populates properties like NumberOfRows, NumberOfColumns and FirstRow.

initialise ( ) : void

Reinitialises the stream back to the beginning

readLine ( ) : string[]

Method Details

CSVReader() public method

Initialises a new CVSReader around the given Stream.
public CSVReader ( Stream stream ) : System
stream Stream
return System

CSVReader() public method

Initialises a new CSVReader and sets up a FileStream on the given filename. Will throw some kind of Exception if the filename is no good.
public CSVReader ( string filename ) : System
filename string
return System

ReadFile() public method

Reads the file, and returns an array of strings organised [Column][Row]
public ReadFile ( ) : string[][]
return string[][]