C# Class EnterpriseWebLibrary.IO.CsvFileWriter

Helps in writing data to a file in CSV format.
Inheritance: TabularDataFileWriter
Exibir arquivo Open project: enduracode/enterprise-web-library Class Usage Examples

Public Methods

Method Description
AddValueToLine ( object val ) : void

Adds the given value as a column on the current line. Value may be null. If it is not null, val.ToString() determines what is added to the line.

AddValuesToLine ( ) : void

Add several values to the current line. Collection can be empty but not null.

ClearLine ( ) : void

Clears the current line. This does not affect the file at all, it simply undoes any calls to AddValueToLine made since the last WriteCurrentLineToFile call.

WriteCurrentLineToFile ( TextWriter writer ) : void

Writes the current line to the file using the given open text writer. This clears the current line after writing.

Method Details

AddValueToLine() public method

Adds the given value as a column on the current line. Value may be null. If it is not null, val.ToString() determines what is added to the line.
public AddValueToLine ( object val ) : void
val object
return void

AddValuesToLine() public method

Add several values to the current line. Collection can be empty but not null.
public AddValuesToLine ( ) : void
return void

ClearLine() public method

Clears the current line. This does not affect the file at all, it simply undoes any calls to AddValueToLine made since the last WriteCurrentLineToFile call.
public ClearLine ( ) : void
return void

WriteCurrentLineToFile() public method

Writes the current line to the file using the given open text writer. This clears the current line after writing.
public WriteCurrentLineToFile ( TextWriter writer ) : void
writer System.IO.TextWriter
return void