Exemple #1
0
 public void Execute(Display[] displays)
 {
     for (int i = 0; i < 10; i++)
     {
         displays.ToList().ForEach(d => d.Write(i.ToString(CultureInfo.InvariantCulture)));
     }
 }
Exemple #2
0
        static void Main(string[] args)
        {
            var display1 = new Display();
            var display2 = new Display();
            var algorithm = new Algorithm();

            algorithm.Execute(new [] { display1, display2 });
            Console.ReadLine();
        }