static void Main(string[] args) { IPrinter newPrintClass = new NewPrintClass(); var legacyPrintClass = new LegacyPrintClass(); IPrinter adapter = new Adapter(legacyPrintClass); List <string> strings = new List <string>() { "Hello", "World", "From" }; newPrintClass.PrintData(strings); adapter.PrintData(strings); Console.Read(); }
public Adapter(LegacyPrintClass legacy) { this.legacy = legacy; }