Currency Currency
Currency Currency
DocFX + Singulink = ♥

Search Results for

    Method ParseMonetaryValue

    ParseMonetaryValue(ReadOnlySpan<char>, MonetaryStyles, IFormatProvider?)

    Converts the string representation of a monetary value to its MonetaryValue equivalent using this currency registry.

    Declaration
    public MonetaryValue ParseMonetaryValue(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. Defaults to CurrencyCode.

    IFormatProvider provider

    A format provider that supplies culture-specific parsing information, or null to use the current culture.

    Returns
    Type Description
    MonetaryValue

    The parsed monetary value.

    Exceptions
    Type Condition
    FormatException

    The string is not in a valid format.

    ParseMonetaryValue(string, MonetaryStyles, IFormatProvider?)

    Converts the string representation of a monetary value to its MonetaryValue equivalent using this currency registry.

    Declaration
    public MonetaryValue ParseMonetaryValue(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. Defaults to CurrencyCode.

    IFormatProvider provider

    A format provider that supplies culture-specific parsing information, or null to use the current culture.

    Returns
    Type Description
    MonetaryValue

    The parsed monetary value.

    Exceptions
    Type Condition
    FormatException

    The string is not in a valid format.

    © Singulink. All rights reserved.