Method Parse
Parse(string, IFormatProvider?)
Converts the string representation of a monetary value to its MonetaryValue equivalent using the Default currency registry.
Declaration
public static MonetaryValue Parse(string s, IFormatProvider? provider)
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. |
Returns
Type | Description |
---|---|
MonetaryValue |
Implements
Parse(string, MonetaryStyles, IFormatProvider?)
Converts the string representation of a monetary value to its MonetaryValue equivalent using the Default currency registry.
Declaration
public static MonetaryValue Parse(string s, MonetaryStyles style = MonetaryStyles.CurrencyCode, IFormatProvider? provider = null)
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. |
Returns
Type | Description |
---|---|
MonetaryValue |
Parse(ReadOnlySpan<char>, IFormatProvider?)
Converts the string representation of a monetary value to its MonetaryValue equivalent using the Default currency registry.
Declaration
public static MonetaryValue Parse(ReadOnlySpan<char> s, IFormatProvider? provider)
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. |
Returns
Type | Description |
---|---|
MonetaryValue |
Implements
Parse(ReadOnlySpan<char>, MonetaryStyles, IFormatProvider?)
Converts the string representation of a monetary value to its MonetaryValue equivalent using the Default currency registry.
Declaration
public static MonetaryValue Parse(ReadOnlySpan<char> s, MonetaryStyles style = MonetaryStyles.CurrencyCode, IFormatProvider? provider = null)
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. |
Returns
Type | Description |
---|---|
MonetaryValue |