C# Class WebConvert, FileZilla.NET

The WebConvert class is a collection of conversion routines designed for use with the web.
Exibir arquivo Open project: sancsoft/FileZilla.NET Class Usage Examples

Public Methods

Method Description
ToBoolean ( object input, bool defaultValue ) : bool

Attempt to convert the supplied object to a Boolean.

ToDateTime ( object input, DateTime defaultValue ) : DateTime

Attempt to convert the supplied object to a DateTime.

ToDouble ( object input, double defaultValue ) : double

Attempt to convert the supplied object to a double-precision float.

ToInt32 ( object input, int defaultValue ) : int

Attempt to convert the supplied object to an Int32.

ToSingle ( object input, float defaultValue ) : float

Attempt to convert the supplied object to a single-precision float.

ToString ( object input, string defaultValue ) : string

Attempt to convert the supplied object to a String.

Method Details

ToBoolean() public static method

Attempt to convert the supplied object to a Boolean.
public static ToBoolean ( object input, bool defaultValue ) : bool
input object The object to parse.
defaultValue bool The default value to use if the conversion fails.
return bool

ToDateTime() public static method

Attempt to convert the supplied object to a DateTime.
public static ToDateTime ( object input, DateTime defaultValue ) : DateTime
input object The object to parse.
defaultValue DateTime The default value to use if the conversion fails.
return DateTime

ToDouble() public static method

Attempt to convert the supplied object to a double-precision float.
public static ToDouble ( object input, double defaultValue ) : double
input object The object to parse.
defaultValue double The default value to use if the conversion fails.
return double

ToInt32() public static method

Attempt to convert the supplied object to an Int32.
public static ToInt32 ( object input, int defaultValue ) : int
input object The object to parse.
defaultValue int The default value to use if the conversion fails.
return int

ToSingle() public static method

Attempt to convert the supplied object to a single-precision float.
public static ToSingle ( object input, float defaultValue ) : float
input object The object to parse.
defaultValue float The default value to use if the conversion fails.
return float

ToString() public static method

Attempt to convert the supplied object to a String.
public static ToString ( object input, string defaultValue ) : string
input object The object to parse.
defaultValue string The default value to use if the conversion fails.
return string