Method TryParse
| Improve this Doc View SourceTryParse(String, IFormatProvider, out BigDecimal)
Converts the string representation of a number to its decimal equivalent.
Declaration
public static bool TryParse(string s, IFormatProvider provider, out BigDecimal result)
Parameters
Type | Name | Description |
---|---|---|
String | s | The string representation of the number to convert. |
IFormatProvider | provider | A format provider that supplies culture-specific parsing information. |
BigDecimal | result | The parsed decimal value if parsing was successful, otherwise zero. |
Returns
Type | Description |
---|---|
Boolean | true if parsing was successful, otherwise false. |
TryParse(String, NumberStyles, IFormatProvider, out BigDecimal)
Converts the string representation of a number to its decimal equivalent.
Declaration
public static bool TryParse(string s, NumberStyles style, IFormatProvider provider, out BigDecimal result)
Parameters
Type | Name | Description |
---|---|---|
String | s | The string representation of the number to convert. |
NumberStyles | style | A combination of NumberStyles values that indicate the styles that can be parsed. |
IFormatProvider | provider | A format provider that supplies culture-specific parsing information. |
BigDecimal | result | The parsed decimal value if parsing was successful, otherwise zero. |
Returns
Type | Description |
---|---|
Boolean | true if parsing was successful, otherwise false. |
TryParse(ReadOnlySpan<Char>, out BigDecimal)
Converts the string representation of a number to its decimal equivalent.
Declaration
public static bool TryParse(ReadOnlySpan<char> s, out BigDecimal result)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<Char> | s | The string representation of the number to convert. |
BigDecimal | result | The parsed decimal value if parsing was successful, otherwise zero. |
Returns
Type | Description |
---|---|
Boolean | true if parsing was successful, otherwise false. |
TryParse(ReadOnlySpan<Char>, IFormatProvider, out BigDecimal)
Converts the string representation of a number to its decimal equivalent.
Declaration
public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider provider, out BigDecimal result)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<Char> | s | The string representation of the number to convert. |
IFormatProvider | provider | A format provider that supplies culture-specific parsing information. |
BigDecimal | result | The parsed decimal value if parsing was successful, otherwise zero. |
Returns
Type | Description |
---|---|
Boolean | true if parsing was successful, otherwise false. |
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, out BigDecimal)
Converts the string representation of a number to its decimal equivalent.
Declaration
public static bool TryParse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider provider, out BigDecimal result)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<Char> | s | The string representation of the number to convert. |
NumberStyles | style | A combination of NumberStyles values that indicate the styles that can be parsed. |
IFormatProvider | provider | A format provider that supplies culture-specific parsing information. |
BigDecimal | result | The parsed decimal value if parsing was successful, otherwise zero. |
Returns
Type | Description |
---|---|
Boolean | true if parsing was successful, otherwise false. |