Table of Contents

MoneyParseMode Enum

Definition

Namespace
Bodu.Financial
Assembly
Bodu.Financial.dll
Package
Bodu.Financial 1.3.0
Source
MoneyParseMode.cs

Specifies how MoneyParseOptions interprets monetary text.

public enum MoneyParseMode
Extension Methods

Fields

StrictIso = 0

Accept 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 = 1

Accept 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 = 2

Accept everything StrictIso accepts and a lower-case ISO code, which is normalized to upper case before resolution.

RoundTripOnly = 3

Accept 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

ProductVersions
.NET8, 10