static void Main(string[] args) { Amount amt = new Amount(Currency.USD, 100); Console.Write($"Have {amt}: "); (Amount taken, _) = amt.Of(Currency.USD).Take(50); Console.WriteLine($"can take {taken}"); Console.Write($"Have {amt}: "); (Amount nextTaken, _) = amt.Of(Currency.USD).Take(50); Console.WriteLine($"can take {nextTaken}"); Console.ReadLine(); }
static void Main(string[] args) { Currency usd = Currency.USD; Amount amt = new Amount(usd, 100); Console.Write($"Have {amt}: "); Amount taken = amt.Of(usd).Take(50).Item1; Console.WriteLine($"can take {taken}"); Console.Write($"Have {amt}: "); taken = amt.Of(usd).Take(50).Item1; Console.WriteLine($"can take {taken}"); Console.ReadLine(); }