Currency Currency
Currency Currency
DocFX + Singulink = ♥

Search Results for

    Method TryParseMoney

    TryParseMoney(ReadOnlySpan<char>, MonetaryStyles, IFormatProvider?, out MonetaryValue)

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

    Declaration
    public bool TryParseMoney(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

    true if parsing was successful; otherwise false.

    TryParseMoney(ReadOnlySpan<char>, MonetaryStyles, IFormatProvider?, out MonetaryValue, out string)

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

    Declaration
    public bool TryParseMoney(ReadOnlySpan<char> s, MonetaryStyles style, IFormatProvider? provider, out MonetaryValue result, out string error)
    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.

    string error

    An error message if parsing failed; otherwise an empty string.

    Returns
    Type Description
    bool

    true if parsing was successful; otherwise false.

    © Singulink. All rights reserved.