Method Subtract
Subtract(MonetaryValue)
Subtracts the specified value from this bag. Zero amounts are not trimmed from the bag.
Declaration
public void Subtract(MonetaryValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| MonetaryValue | value |
Implements
Remarks
Default values that are not associated with any currency are ignored.
Subtract(decimal, ReadOnlySpan<char>)
Subtracts the specified currency and amount from this bag. Zero amounts are not trimmed from the bag.
Declaration
public void Subtract(decimal amount, ReadOnlySpan<char> currencyCode)
Parameters
| Type | Name | Description |
|---|---|---|
| decimal | amount | |
| ReadOnlySpan<char> | currencyCode |
Subtract(decimal, Currency)
Adds the specified currency and amount to this bag.
Declaration
public void Subtract(decimal amount, Currency currency)
Parameters
| Type | Name | Description |
|---|---|---|
| decimal | amount | |
| Currency | currency |
Implements
Subtract(decimal, string)
Subtracts the specified currency and amount from this bag. Zero amounts are not trimmed from the bag.
Declaration
public void Subtract(decimal amount, string currencyCode)
Parameters
| Type | Name | Description |
|---|---|---|
| decimal | amount | |
| string | currencyCode |