Method RoundToCash
RoundToCash(MidpointRounding)
Rounds each value's amount according to its currency's CashRoundingPolicy using the specified midpoint rounding mode (which defaults to ToEven "banker's rounding") and returns the resulting bag.
Declaration
IImmutableMoneyBag RoundToCash(MidpointRounding mode = MidpointRounding.ToEven)
Parameters
| Type | Name | Description |
|---|---|---|
| MidpointRounding | mode |
Returns
| Type | Description |
|---|---|
| IImmutableMoneyBag |
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | Cash rounding rules are not available for one of the currencies in the bag. See CashRoundingPolicy for more information. |