Click or drag to resize

CsvWriter Class

Writes CSV into a TextWriter.
Inheritance Hierarchy
SystemObject
  PDTec.IceNet.Sdk.UtilsCsvWriter

Namespace:  PDTec.IceNet.Sdk.Utils
Assembly:  PDTec.IceNet.Sdk (in PDTec.IceNet.Sdk.dll) Version: 7.2.0.0 (7.2.7583.15464)
Syntax
C#
public class CsvWriter : IDisposable

The CsvWriter type exposes the following members.

Constructors
  NameDescription
Public methodCsvWriter(TextWriter)
Initializes a new instance of the CsvWriter class
Public methodCsvWriter(TextWriter, Char, Char)
Initializes a new instance of the CsvWriter class
Top
Properties
Methods
  NameDescription
Public methodDispose
Releases all resources used by the CsvWriter
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberJoin(String)
Public methodStatic memberJoin(String, Char, Char)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteLine
Top
Remarks

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.

Examples
using (CsvWriter w = new CsvWriter(Console.Out))
{
    w.WriteLine(@"Bla", @"'Blubb'", @";Blubb", @";'Blubb'", @"'Blarb'
        Blubb");

    w.WriteLine(@"Next line");
    w.WriteLine(@"Next line");
}
See Also