BigIntegerStatic: Parse

Parse

Attemps to parse a string of characters of the specified base type.



 Public Function Parse(
	  ByRef Value As String,
	  Optional ByVal Style As NumberStyles = NumberStyles. Integer,
	  Optional ByVal Provider As IFormatProvider ) As BigInteger

Parameters

Value
[ByRef] String. The string of characters to attempt to be parsed.
Style
[ByVal] Optional. NumberStyles. A bitwise combination of the enumeration values that specify the permitted format of Value.  

Default: NumberStyles . Integer

Provider
[ByVal] Optional. IFormatProvider. An object that provides culture-specific formatting information about Value.

Return Values

BigInteger -  Returns an instance of BigInteger containing the parsed value.

Remarks

If the string could not be parsed, an exception is thrown.

3 base types are supported for parsing (Decimal, Hex.) The string must include a base type specifier for Hex. Decimal is the default.

Hex Specifiers: 0x, 0X, &H, &H - (0xFF, 0XFF, &HFF, &HFF)

 Dim b As BigInteger
 Set b = BigInteger.Parse("&H7FFF")
 Debug.Print b.ToString("X") ' 7FFF
 

Parsing is not case sensitive.

See Also

Project CorLib Overview

Class BigIntegerStatic Overview