CsvWriter Class |
Namespace: PDTec.IceNet.Sdk.Utils
public class CsvWriter : IDisposable
The CsvWriter type exposes the following members.
Name | Description | |
---|---|---|
CsvWriter(TextWriter) | Initializes a new instance of the CsvWriter class | |
CsvWriter(TextWriter, Char, Char) | Initializes a new instance of the CsvWriter class |
Name | Description | |
---|---|---|
DefaultDelimiter | ||
DefaultSeparator | ||
Delimiter | ||
Separator |
Name | Description | |
---|---|---|
Dispose | Releases all resources used by the CsvWriter | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Join(String) | ||
Join(String, Char, Char) | ||
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
WriteLine |
Full-featured implementation (covers line-breaks in quoted cells). Specification see also: http://en.wikipedia.org/wiki/Comma-separated_values
Separator and delimiter characters are not fixed in CSV specification. The default characters are comma and apostrophe. In German enviromnents they can be switched to semicolon and (double) quote.
using (CsvWriter w = new CsvWriter(Console.Out)) { w.WriteLine(@"Bla", @"'Blubb'", @";Blubb", @";'Blubb'", @"'Blarb' Blubb"); w.WriteLine(@"Next line"); w.WriteLine(@"Next line"); }