static void Main(string[] args) { var formatter = new Formatter(); var helloPrinter = new Hello(formatter); helloPrinter.SayHelloToFriends(new[] { "Stan", "Scott", "John" }); }
public Hello(Formatter formatter) { this.formatter = formatter; }