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