CsvReader Class |
Namespace: PDTec.IceNet.Sdk.Utils
public class CsvReader : IDisposable
The CsvReader type exposes the following members.
Name | Description | |
---|---|---|
CsvReader(TextReader) | Initializes a new instance of the CsvReader class | |
CsvReader(TextReader, Char, Char) | Initializes a new instance of the CsvReader class |
Name | Description | |
---|---|---|
Dispose | Releases all resources used by the CsvReader | |
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.) | |
GetEnumerator | ||
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Split(String) | ||
Split(String, Char, Char) | ||
ToString | Returns a string that represents the current object. (Inherited from Object.) |
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 (CsvReader reader = new CsvReader(new StringReader(csv), ';', '"')) { foreach (List<string> row in reader) { foreach (string s in row) { Console.Write("[" + s + "]"); } Console.WriteLine(); } }