C# Class Engage.Dnn.Booking.CsvWriter

Writes the contents of a DataTable as comma-separated values
from http://knab.ws/blog/index.php?/archives/3-CSV-file-parser-and-writer-in-C-Part-1.html
Afficher le fichier Open project: EngageSoftware/Engage-Booking Class Usage Examples

Méthodes publiques

Méthode Description
WriteToStream ( TextWriter stream, DataTable table, bool header, bool quoteAll ) : void

Writes a DataTable to a TextWriter stream.

WriteToString ( DataTable table, bool header, bool quoteAll ) : string

Writes a DataTable to string.

Private Methods

Méthode Description
WriteItem ( TextWriter stream, object item, bool quoteAll ) : void

Writes a single DataTable row to a TextWriter stream.

Method Details

WriteToStream() public static méthode

Writes a DataTable to a TextWriter stream.
public static WriteToStream ( TextWriter stream, DataTable table, bool header, bool quoteAll ) : void
stream System.IO.TextWriter The stream to which the CSV should be written.
table System.Data.DataTable The table of data to write as a CSV.
header bool if set to true, include a header row.
quoteAll bool if set to true enclose all cells/fields in quotes.
Résultat void

WriteToString() public static méthode

Writes a DataTable to string.
public static WriteToString ( DataTable table, bool header, bool quoteAll ) : string
table System.Data.DataTable The table of data to write as a CSV.
header bool if set to true, include a header row.
quoteAll bool if set to true enclose all cells/fields in quotes.
Résultat string