C# Класс WebConvert, FileZilla.NET

The WebConvert class is a collection of conversion routines designed for use with the web.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

ToBoolean() публичный статический Метод

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.
Результат bool

ToDateTime() публичный статический Метод

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.
Результат DateTime

ToDouble() публичный статический Метод

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.
Результат double

ToInt32() публичный статический Метод

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.
Результат int

ToSingle() публичный статический Метод

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.
Результат float

ToString() публичный статический Метод

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.
Результат string