Exemple #1
0
 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());
 }
Exemple #2
0
 static void Execute(IAggregate function)
 {
     function.Insert(4);
     function.Insert(4);
     Console.WriteLine(function.Calculate());
 }