BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 System.Enum System.Flags System.Runtime.InteropServices.ComVisible(true)

The enumeration consists of two kinds of enumeration values that are used to parse the string representations of numeric values:

Individual field flags, which define specific style elements (such as white space and group separators) that can be present in the parsed string.

Composite number styles, which consist of multiple field flags that define the style elements that can be present in the parsed string.

Except for , the individual field flags in the enumeration define style elements that are used when parsing the string representation of a decimal number. indicates that only digits can be present in the parsed string. The remaining individual field flags define style elements that may be, but do not have to be, present in the string representation of a decimal number for the parse operation to succeed. In contrast, the flag indicates that the string to be parsed is always interpreted as a hexadecimal value. The only individual field flags that can be used with are and . The enumeration includes a composite number style, , that consists of all three flags.

The symbols (such as the currency symbol, the group separator, the decimal separator, and the positive and negative signs) that can appear in the string to be parsed are defined by the members of the object that is passed either implicitly or explicitly to the Parse method. The members table in this topic provides a description of each individual flag and indicates its relationship to properties.

The following table lists the composite number styles and indicates which individual field flags they include. A "1" in a cell indicates that the composite number style includes the individual number style in that row. A "0" indicates that the composite number style does not include the individual number style.

Any

Currency

Float

Integer

Number

HexNumber

AllowHexSpecifier (0x0200)

0

0

0

0

0

1

AllowCurrencySymbol (0x0100)

1

1

0

0

0

0

AllowExponent (0x0080)

1

0

1

0

0

0

AllowThousands (0x0040)

1

1

0

0

1

0

AllowDecimalPoint (0x0020)

1

1

1

0

1

0

AllowParentheses (0x0010)

1

1

0

0

0

0

AllowTrailingSign (0x0008)

1

1

0

0

1

0

AllowLeadingSign (0x0004)

1

1

1

1

1

0

AllowTrailingWhite (0x0002)

1

1

1

1

1

1

AllowLeadingWhite (0x0001)

1

1

1

1

1

1

(0x1ff)

(0x17f)

(0x0a7)

(0x007)

(0x06f)

(0x203)

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

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles AllowCurrencySymbol To be added.

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

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles AllowDecimalPoint To be added.

  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.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles AllowExponent To be added.

  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.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles AllowHexSpecifier To be added.

  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.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles AllowLeadingSign To be added.

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

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles AllowLeadingWhite To be added.

  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 true.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles AllowParentheses To be added.

  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.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles AllowThousands To be added.

  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.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles AllowTrailingSign To be added.

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

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles AllowTrailingWhite To be added.

  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 true.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles Any To be added.

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

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles Currency To be added.

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

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles Float To be added.

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

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles HexNumber To be added.

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

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles Integer To be added.

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

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles None To be added.

  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.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.NumberStyles Number To be added.

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

  0
0