The style parameter defines the style elements (such as white space or the positive sign) that are allowed in the s parameter for the parse operation to succeed. It must be a combination of bit flags from the NumberStyles enumeration. Depending on the value of style, the s parameter may include the following elements:

A culture-specific thousands separator symbol. The thousands separator of the culture specified by provider can appear in s if style includes the NumberStyles.AllowThousands flag.

.

A culture-specific decimal point symbol. The decimal point symbol of the culture specified by provider can appear in s if style includes the NumberStyles.AllowDecimalPoint flag.

Only the digit 0 can appear as a fractional digit for the parse operation to succeed; if fractional_digits includes any other digit, an OverflowException is thrown.

e

The 'e' or 'E' character, which indicates that the value is represented in exponential notation. The s parameter can represent a number in exponential notation if style includes the NumberStyles.AllowExponent flag.

hexdigits

A sequence of hexadecimal digits from 0 through f, or 0 through F.

A string with decimal digits only (which corresponds to the NumberStyles.None style) always parses successfully if it is in the range of the Int64 type. Most of the remaining NumberStyles members control elements that may be but are not required to be present in this input string. The following table indicates how individual NumberStyles members affect the elements that may be present in s.

The following example uses a variety of style and provider parameters to parse the string representations of Int64 values. It also illustrates some of the different ways the same string can be interpreted depending on the culture whose formatting information is used for the parsing operation.