struct NumberStyles

in global :: System . Globalization

Determines the styles permitted in numeric string arguments that are passed to the and methods of the integral and floating-point numeric types.


public static NumberStyles AllowCurrencySymbol

Indicates that the numeric string can contain a currency symbol. Valid currency symbols are determined by the property.

public static NumberStyles AllowDecimalPoint

Indicates that the numeric string can have a decimal point. If the value includes the flag and the parsed string includes a currency symbol, the decimal separator character is determined by the property. Otherwise, the decimal separator character is determined by the property.

public static NumberStyles AllowExponent

Indicates that the numeric string can be in exponential notation. The flag allows the parsed string to contain an exponent that begins with the "E" or "e" character and that is followed by an optional positive or negative sign and an integer. In other words, it successfully parses strings in the form nnnExx, nnnE+xx, and nnnE-xx. It does not allow a decimal separator or sign in the significand or mantissa; to allow these elements in the string to be parsed, use the and flags, or use a composite style that includes these individual flags.

public static NumberStyles AllowHexSpecifier

Indicates that the numeric string represents a hexadecimal value. Valid hexadecimal values include the numeric digits 0-9 and the hexadecimal digits A-F and a-f. Strings that are parsed using this style cannot be prefixed with "0x" or "&h". A string that is parsed with the style will always be interpreted as a hexadecimal value. The only flags that can be combined with are and . The enumeration includes a composite style, , that consists of these three flags.

public static NumberStyles AllowLeadingSign

Indicates that the numeric string can have a leading sign. Valid leading sign characters are determined by the and properties.

public static NumberStyles AllowLeadingWhite

Indicates that leading white-space characters can be present in the parsed string. Valid white-space characters have the Unicode values U+0009, U+000A, U+000B, U+000C, U+000D, and U+0020. Note that this is a subset of the characters for which the method returns .

public static NumberStyles AllowParentheses

Indicates that the numeric string can have one pair of parentheses enclosing the number. The parentheses indicate that the string to be parsed represents a negative number.

public static NumberStyles AllowThousands

Indicates that the numeric string can have group separators, such as symbols that separate hundreds from thousands. If the value includes the flag and the string to be parsed includes a currency symbol, the valid group separator character is determined by the property, and the number of digits in each group is determined by the property. Otherwise, the valid group separator character is determined by the property, and the number of digits in each group is determined by the property.

public static NumberStyles AllowTrailingSign

Indicates that the numeric string can have a trailing sign. Valid trailing sign characters are determined by the and properties.

public static NumberStyles AllowTrailingWhite

Indicates that trailing white-space characters can be present in the parsed string. Valid white-space characters have the Unicode values U+0009, U+000A, U+000B, U+000C, U+000D, and U+0020. Note that this is a subset of the characters for which the method returns .

public static NumberStyles Any

Indicates that all styles except are used. This is a composite number style.

public static NumberStyles Currency

Indicates that all styles except and are used. This is a composite number style.

public static NumberStyles Float

Indicates that the , , , , and styles are used. This is a composite number style.

public static NumberStyles HexNumber

Indicates that the , , and styles are used. This is a composite number style.

public static NumberStyles Integer

Indicates that the , , and styles are used. This is a composite number style.

public static NumberStyles None

Indicates that no style elements, such as leading or trailing white space, thousands separators, or a decimal separator, can be present in the parsed string. The string to be parsed must consist of integral decimal digits only.

public static NumberStyles Number

Indicates that the , , , , , and styles are used. This is a composite number style.

public static NumberStyles BinaryNumber

😔 No documentation found.

public static NumberStyles AllowBinarySpecifier

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public bool HasFlag( Enum flag )

😔 No documentation found.

public int CompareTo( object target )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public string ToString( string format )

😔 No documentation found.

public string ToString( IFormatProvider provider )

😔 No documentation found.

public string ToString( string format, IFormatProvider provider )

😔 No documentation found.

public TypeCode GetTypeCode( )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public int value__

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.