C# Class WebConvert, FileZilla.NET

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

Méthodes publiques

Méthode 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 méthode

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.
Résultat bool

ToDateTime() public static méthode

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.
Résultat DateTime

ToDouble() public static méthode

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.
Résultat double

ToInt32() public static méthode

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.
Résultat int

ToSingle() public static méthode

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.
Résultat float

ToString() public static méthode

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.
Résultat string