Method TryParse
TryParse(string?, out BigDecimal)
Converts the string representation of a number to its decimal equivalent.
Declaration
public static bool TryParse(string? s, out BigDecimal result)
Parameters
| Type | Name | Description |
|---|---|---|
| string | s | The string representation of the number to convert. |
| BigDecimal | result | The parsed decimal value if parsing was successful, otherwise zero. |
Returns
| Type | Description |
|---|---|
| bool |
TryParse(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 |
|---|---|
| bool |
Implements
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 |
|---|---|
| bool |
Implements
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 |
|---|---|
| bool |
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 |
|---|---|
| bool |
Implements
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 |
|---|---|
| bool |