BigInteger.TryParse Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Tries to convert the string representation of a number to its BigInteger equivalent, and returns a value that indicates whether the conversion succeeded.
Overloads
| Name | Description |
|---|---|
| TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, BigInteger) |
Tries to convert the string representation of a number to its BigInteger equivalent, and returns a value that indicates whether the conversion succeeded. |
| TryParse(ReadOnlySpan<Byte>, BigInteger) | |
| TryParse(ReadOnlySpan<Char>, BigInteger) |
Tries to convert the representation of a number contained in the specified read-only character span, to its BigInteger equivalent, and returns a value that indicates whether the conversion succeeded. |
| TryParse(String, BigInteger) |
Tries to convert the string representation of a number to its BigInteger equivalent, and returns a value that indicates whether the conversion succeeded. |
| TryParse(ReadOnlySpan<Byte>, IFormatProvider, BigInteger) | |
| TryParse(String, IFormatProvider, BigInteger) |
Tries to parse a string into a value. |
| TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, BigInteger) | |
| TryParse(String, NumberStyles, IFormatProvider, BigInteger) |
Tries to convert the string representation of a number in a specified style and culture-specific format to its BigInteger equivalent, and returns a value that indicates whether the conversion succeeded. |
| TryParse(ReadOnlySpan<Char>, IFormatProvider, BigInteger) |
Tries to parse a span of characters into a value. |
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, BigInteger)
- Source:
- BigInteger.cs
- Source:
- BigInteger.cs
- Source:
- BigInteger.cs
- Source:
- BigInteger.cs
- Source:
- BigInteger.cs
Tries to convert the string representation of a number to its BigInteger equivalent, and returns a value that indicates whether the conversion succeeded.
public:
static bool TryParse(ReadOnlySpan<char> value, System::Globalization::NumberStyles style, IFormatProvider ^ provider, [Runtime::InteropServices::Out] System::Numerics::BigInteger % result) = System::Numerics::INumberBase<System::Numerics::BigInteger>::TryParse;
public:
static bool TryParse(ReadOnlySpan<char> value, System::Globalization::NumberStyles style, IFormatProvider ^ provider, [Runtime::InteropServices::Out] System::Numerics::BigInteger % result);
public static bool TryParse(ReadOnlySpan<char> value, System.Globalization.NumberStyles style, IFormatProvider? provider, out System.Numerics.BigInteger result);
public static bool TryParse(ReadOnlySpan<char> value, System.Globalization.NumberStyles style, IFormatProvider provider, out System.Numerics.BigInteger result);
static member TryParse : ReadOnlySpan<char> * System.Globalization.NumberStyles * IFormatProvider * BigInteger -> bool
Public Shared Function TryParse (value As ReadOnlySpan(Of Char), style As NumberStyles, provider As IFormatProvider, ByRef result As BigInteger) As Boolean
Parameters
- value
- ReadOnlySpan<Char>
The representation of a number as a read-only span of characters.
- style
- NumberStyles
A bitwise combination of enumeration values that indicates the style elements that can be present in value. A typical value to specify is Integer.
- provider
- IFormatProvider
An object that supplies culture-specific formatting information about value.
- result
- BigInteger
When this method returns, contains the BigInteger equivalent to the number that is contained in value, or Zero if the conversion failed. The conversion fails if the value parameter is an empty character span or is not in a format that is compliant with style. This parameter is passed uninitialized.
Returns
true if value was converted successfully; otherwise, false.