Big Integer.Parse Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.5
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.5
Overload List
| Parse( | Converts the string representation of a number to its BigInteger equivalent. |
| Parse( | Parses a span of characters into a value. |
| Parse( | Converts the string representation of a number in a specified style to its BigInteger equivalent. |
| Parse( | Converts the string representation of a number in a specified culture-specific format to its BigInteger equivalent. |
| Parse( | Parses a span of characters into a value. |
| Parse( | Converts the string representation of a number in a specified style and culture-specific format to its BigInteger equivalent. |
Parse(String)
Converts the string representation of a number to its BigInteger equivalent.
public static BigInteger Parse(
string s
)Parameters
- s String
- A string containing a number to convert.
Return Value
BigIntegerA BigInteger equivalent to the numeric s or symbol specified in s.
Exceptions
| Argument | s is null. |
| Format | s is not a number in a valid format. |
Parse(ReadOnlySpan<Char>, IFormatProvider)
Parses a span of characters into a value.
public static BigInteger Parse(
ReadOnlySpan<char> s,
IFormatProvider? provider
)Parameters
- s ReadOnlySpan<Char>
- The span of characters to parse.
- provider IFormatProvider
- An object that provides culture-specific formatting information about s.
Return Value
BigIntegerThe result of parsing s.
Implements
ISpanParsable<TSelf>.Parse(ReadOnlySpan<Char>, IFormatProvider)Exceptions
| Format | s is not in the correct format. |
| Overflow | s is not representable by TSelf. |
Parse(String, NumberStyles)
Converts the string representation of a number in a specified style to its BigInteger equivalent.
public static BigInteger Parse(
string s,
NumberStyles style
)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.
Return Value
BigIntegerA BigInteger equivalent to the numeric s or symbol specified in s.
Exceptions
| Argument | s is null. |
| Format | s is not a number in a valid format. |
Parse(String, IFormatProvider)
Converts the string representation of a number in a specified culture-specific format to its BigInteger equivalent.
public static BigInteger Parse(
string s,
IFormatProvider? provider
)Parameters
- s String
- A string containing a number to convert.
- provider IFormatProvider
- An IFormatProvider that supplies culture-specific formatting information about s.
Return Value
BigIntegerA BigInteger equivalent to the numeric s or symbol specified in s.
Implements
IParsable<TSelf>.Parse(String, IFormatProvider)Exceptions
| Argument | s is null. |
| Format | s is not a number in a valid format. |
Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)
Parses a span of characters into a value.
public static BigInteger Parse(
ReadOnlySpan<char> s,
NumberStyles style,
IFormatProvider? provider
)Parameters
- s ReadOnlySpan<Char>
- The span of characters to parse.
- style NumberStyles
- A bitwise combination of number styles that can be present in s.
- provider IFormatProvider
- An object that provides culture-specific formatting information about s.
Return Value
BigIntegerThe result of parsing s.
Implements
INumberBase<TSelf>.Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)Exceptions
| Argument | style is not a supported NumberStyles value. |
| Format | s is not in the correct format. |
| Overflow | s is not representable by TSelf. |
Parse(String, NumberStyles, IFormatProvider)
Converts the string representation of a number in a specified style and culture-specific format to its BigInteger equivalent.
public static BigInteger Parse(
string s,
NumberStyles style,
IFormatProvider? provider
)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.
Return Value
BigIntegerA BigInteger equivalent to the numeric s or symbol specified in s.
Implements
INumberBase<TSelf>.Parse(String, NumberStyles, IFormatProvider)Exceptions
| Argument | s is null. |
| Format | s is not a number in a valid format. |