MoneyParseMode Enum
Definition
Specifies how MoneyParseOptions interprets monetary text.
public enum MoneyParseMode
- Extension Methods
Fields
StrictIso = 0Accept only the
"<ISO> <amount>"or"<amount> <ISO>"forms, with a registered, uppercase ISO code separated from the amount by one space, after trimming surrounding white space. A bare amount with no ISO code is rejected. This is the default.CultureAware = 1Accept everything StrictIso accepts and, when no ISO code is present, a leading or trailing currency symbol that CurrencyLookup resolves to exactly one currency. The shipped catalog carries no symbols, so symbol text parses only through a caller-supplied lookup that provides them.
LenientImport = 2Accept everything StrictIso accepts and a lower-case ISO code, which is normalized to upper case before resolution.
RoundTripOnly = 3Accept only the invariant round-trip form produced by the
"R"format specifier: the uppercase ISO code, one space, and the amount in invariant fixed-point notation (an optional leading minus sign, digits, and an optional decimal point followed by digits), with no surrounding white space. FormatProvider is ignored, and a scale finer than the currency's registered minor units is kept, so the parsed value equals the value that was formatted.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |