C# Class Wxv.Swg.Common.CsvUtil

A CSV String Formatting & Parsing class that also provides some static methods for quick access Example of proper formatting use : Console.WriteLine (String.Format (new CsvUtil (), "{0} converts to {1:csv}", myStr)); Example of quicky use : Console.WriteLine (CsvUtil.Format (myStr)); or Console.WriteLine (CsvUtil.Format (myStrCollection));
Afficher le fichier Open project: wverkley/Swg.Explorer

Méthodes publiques

Méthode Description
Format ( ICollection collection ) : string
Format ( object value ) : string
Parse ( string str, Type destinationType ) : Array
Parse ( TextReader reader ) : string[]

Parses a CSV record from a TextReader. Returns null if it doesnt find a complete line or its at the end.

Parse ( string str ) : string[]

Parse this string into a CSV record. Returns null if its not complete.

ParseIsComplete ( string str ) : bool

Does this string represent a complete CSV record?

Private Methods

Méthode Description
Parse ( string str, List result ) : bool
ParseField ( string str ) : string

Method Details

Format() public static méthode

public static Format ( ICollection collection ) : string
collection ICollection
Résultat string

Format() public static méthode

public static Format ( object value ) : string
value object
Résultat string

Parse() public static méthode

public static Parse ( string str, Type destinationType ) : Array
str string
destinationType System.Type
Résultat System.Array

Parse() public static méthode

Parses a CSV record from a TextReader. Returns null if it doesnt find a complete line or its at the end.
public static Parse ( TextReader reader ) : string[]
reader TextReader
Résultat string[]

Parse() public static méthode

Parse this string into a CSV record. Returns null if its not complete.
public static Parse ( string str ) : string[]
str string
Résultat string[]

ParseIsComplete() public static méthode

Does this string represent a complete CSV record?
public static ParseIsComplete ( string str ) : bool
str string
Résultat bool