C# Класс 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
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
WriteItem ( TextWriter stream, object item, bool quoteAll ) : void

Writes a single DataTable row to a TextWriter stream.

Описание методов

WriteToStream() публичный статический Метод

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.
Результат void

WriteToString() публичный статический Метод

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.
Результат string