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));
ファイルを表示 Open project: wverkley/Swg.Explorer

Public Methods

Method 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

Method Description
Parse ( string str, List result ) : bool
ParseField ( string str ) : string

Method Details

Format() public static method

public static Format ( ICollection collection ) : string
collection ICollection
return string

Format() public static method

public static Format ( object value ) : string
value object
return string

Parse() public static method

public static Parse ( string str, Type destinationType ) : Array
str string
destinationType System.Type
return System.Array

Parse() public static method

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
return string[]

Parse() public static method

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

ParseIsComplete() public static method

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