static void Execute(IAggregate function, List <int> numbers) //passing the list of ints from the command line (args) into the execute { foreach (var number in numbers) { function.Insert(number); } Console.WriteLine(function.Calculate()); }
static void Execute(IAggregate function) { function.Insert(4); function.Insert(4); Console.WriteLine(function.Calculate()); }