Method TryParse
TryParse(string?, out MonetaryValue)
Converts the string representation of a monetary value to its MonetaryValue equivalent using the Default currency registry.
Declaration
public static bool TryParse(string? s, out MonetaryValue result)
Parameters
Type | Name | Description |
---|---|---|
string | s | The string representation of the monetary value to convert. |
MonetaryValue | result | The parsed monetary value if parsing was successful; otherwise a default monetary value. |
Returns
Type | Description |
---|---|
bool |
TryParse(string?, IFormatProvider?, out MonetaryValue)
Converts the string representation of a monetary value to its MonetaryValue equivalent using the Default currency registry.
Declaration
public static bool TryParse(string? s, IFormatProvider? provider, out MonetaryValue result)
Parameters
Type | Name | Description |
---|---|---|
string | s | The string representation of the monetary value to convert. |
IFormatProvider | provider | A format provider that supplies culture-specific parsing information. |
MonetaryValue | result | The parsed monetary value if parsing was successful; otherwise a default monetary value. |
Returns
Type | Description |
---|---|
bool |
Implements
TryParse(string?, MonetaryStyles, IFormatProvider?, out MonetaryValue)
Converts the string representation of a monetary value to its MonetaryValue equivalent using the Default currency registry.
Declaration
public static bool TryParse(string? s, MonetaryStyles style, IFormatProvider? provider, out MonetaryValue result)
Parameters
Type | Name | Description |
---|---|---|
string | s | The string representation of the monetary value to convert. |
MonetaryStyles | style | A combination of MonetaryStyles values that indicate the styles that can be parsed. |
IFormatProvider | provider | A format provider that supplies culture-specific parsing information. |
MonetaryValue | result | The parsed monetary value if parsing was successful; otherwise a default monetary value. |
Returns
Type | Description |
---|---|
bool |
TryParse(ReadOnlySpan<char>, out MonetaryValue)
Converts the string representation of a monetary value to its MonetaryValue equivalent using the Default currency registry.
Declaration
public static bool TryParse(ReadOnlySpan<char> s, out MonetaryValue result)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<char> | s | The string representation of the monetary value to convert. |
MonetaryValue | result | The parsed monetary value if parsing was successful; otherwise a default monetary value. |
Returns
Type | Description |
---|---|
bool |
TryParse(ReadOnlySpan<char>, IFormatProvider?, out MonetaryValue)
Converts the string representation of a monetary value to its MonetaryValue equivalent using the Default currency registry.
Declaration
public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out MonetaryValue result)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<char> | s | The string representation of the monetary value to convert. |
IFormatProvider | provider | A format provider that supplies culture-specific parsing information. |
MonetaryValue | result | The parsed monetary value if parsing was successful; otherwise a default monetary value. |
Returns
Type | Description |
---|---|
bool |
Implements
TryParse(ReadOnlySpan<char>, MonetaryStyles, IFormatProvider?, out MonetaryValue)
Converts the string representation of a monetary value to its MonetaryValue equivalent using the Default currency registry.
Declaration
public static bool TryParse(ReadOnlySpan<char> s, MonetaryStyles style, IFormatProvider? provider, out MonetaryValue result)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<char> | s | The string representation of the monetary value to convert. |
MonetaryStyles | style | A combination of MonetaryStyles values that indicate the styles that can be parsed. |
IFormatProvider | provider | A format provider that supplies culture-specific parsing information. |
MonetaryValue | result | The parsed monetary value if parsing was successful; otherwise a default monetary value. |
Returns
Type | Description |
---|---|
bool |