C# Класс Moon.Invariant

Provides convenient methods for quickly parsing values from strings rendered in the invariant culture.
Показать файл Открыть проект

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

Метод Описание
TryParse ( string str, decimal &value ) : bool

Tries to parse a decimal number out of a string using the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.

TryParse ( string str, double &value ) : bool

Tries to parse a double-precision floating point number out of a string using the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.

TryParse ( string str, float &value ) : bool

Tries to parse a single-precision floating point number out of a string using the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.

TryParse ( string str, int &value ) : bool

Tries to parse a 32-bit signed integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.

TryParse ( string str, long &value ) : bool

Tries to parse a 64-bit signed integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.

TryParse ( string str, uint &value ) : bool

Tries to parse a 32-bit unsigned integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.

TryParse ( string str, ulong &value ) : bool

Tries to parse a 64-bit unsigned integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.

TryParseExact ( string str, double &value ) : bool

Tries to parse a double-precision floating point number out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings but does not accept whitespace.

TryParseExact ( string str, float &value ) : bool

Tries to parse a single-precision floating point number out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings but does not accept whitespace.

TryParseExact ( string str, int &value ) : bool

Tries to parse a 32-bit signed integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings but does not accept whitespace.

TryParseExact ( string str, long &value ) : bool

Tries to parse a 64-bit signed integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings but does not accept whitespace.

TryParseExact ( string str, uint &value ) : bool

Tries to parse a 32-bit unsigned integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings but does not accept whitespace.

TryParseExact ( string str, ulong &value ) : bool

Tries to parse a 64-bit unsigned integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings but does not accept whitespace.

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

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

Tries to parse a decimal number out of a string using the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.
public static TryParse ( string str, decimal &value ) : bool
str string The input string.
value decimal The parsed value.
Результат bool

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

Tries to parse a double-precision floating point number out of a string using the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.
public static TryParse ( string str, double &value ) : bool
str string The input string.
value double The parsed value.
Результат bool

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

Tries to parse a single-precision floating point number out of a string using the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.
public static TryParse ( string str, float &value ) : bool
str string The input string.
value float The parsed value.
Результат bool

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

Tries to parse a 32-bit signed integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.
public static TryParse ( string str, int &value ) : bool
str string The input string.
value int The parsed value.
Результат bool

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

Tries to parse a 64-bit signed integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.
public static TryParse ( string str, long &value ) : bool
str string The input string.
value long The parsed value.
Результат bool

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

Tries to parse a 32-bit unsigned integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.
public static TryParse ( string str, uint &value ) : bool
str string The input string.
value uint The parsed value.
Результат bool

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

Tries to parse a 64-bit unsigned integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings and leading and trailing whitespace.
public static TryParse ( string str, ulong &value ) : bool
str string The input string.
value ulong The parsed value.
Результат bool

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

Tries to parse a double-precision floating point number out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings but does not accept whitespace.
public static TryParseExact ( string str, double &value ) : bool
str string The input string.
value double The parsed value.
Результат bool

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

Tries to parse a single-precision floating point number out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings but does not accept whitespace.
public static TryParseExact ( string str, float &value ) : bool
str string The input string.
value float The parsed value.
Результат bool

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

Tries to parse a 32-bit signed integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings but does not accept whitespace.
public static TryParseExact ( string str, int &value ) : bool
str string The input string.
value int The parsed value.
Результат bool

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

Tries to parse a 64-bit signed integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings but does not accept whitespace.
public static TryParseExact ( string str, long &value ) : bool
str string The input string.
value long The parsed value.
Результат bool

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

Tries to parse a 32-bit unsigned integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings but does not accept whitespace.
public static TryParseExact ( string str, uint &value ) : bool
str string The input string.
value uint The parsed value.
Результат bool

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

Tries to parse a 64-bit unsigned integer out of a string using the same format as the CultureInfo.InvariantCulture. The method accepts null strings but does not accept whitespace.
public static TryParseExact ( string str, ulong &value ) : bool
str string The input string.
value ulong The parsed value.
Результат bool