BigInteger.TryParse(String, NumberStyles, IFormatProvider, BigInteger) Method

Converts the string representation of a number in a specified style and culture-specific format to its BigInteger equivalent. A return value indicates whether the conversion succeeded or failed.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static bool TryParse(
	string s,
	NumberStyles style,
	IFormatProvider provider,
	out BigInteger value
)

Parameters

s  String
A string containing a number to convert.
style  NumberStyles
A bitwise combination of NumberStyles values that indicates the permitted format of s.
provider  IFormatProvider
An IFormatProvider that supplies culture-specific formatting information about s.
value  BigInteger
When this method returns, contains the BigInteger equivalent to the number contained in s, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is null, or is not of the correct format., This parameter is passed uninitialized.

Return Value

Boolean
true if s was converted successfully; otherwise, false.

Exceptions

ArgumentExceptionstyle is not a NumberStyles value.

-or-

style is not a combination of AllowHexSpecifier and HexNumber values.

See Also