Takes money and a cost and gives back the appropriate change.

Namespace: BaseLib
Assembly: BaseLib (in BaseLib.dll) Version: 0.5.0.0

Syntax

C#
public static void MakeChange(
	IEnumerable<Money> money,
	int cost,
	string moneySet,
	out List<Money> used,
	out List<Thing> change
)

Parameters

money
Type: System.Collections.Generic..::..IEnumerable<(Of <(<'Money>)>)>
The money to pay with.
cost
Type: System..::..Int32
How much to take out of money.
moneySet
Type: System..::..String
The money set to use for payment and change.
used
Type: System.Collections.Generic..::..List<(Of <(<'Money>)>)>%
The money objects that were used.
change
Type: System.Collections.Generic..::..List<(Of <(<'Thing>)>)>%
The new objects created for the change.

See Also