static void Main(string[] args) { Console.WriteLine("Employee List from ThirdPartyEmployee class"); ITarget adapter = new EmployeeAdapter(); foreach (var employee in adapter.GetEmployees()) { Console.WriteLine(employee); } Console.ReadLine(); }
static void Main(string[] args) { Console.WriteLine("Employee list from 3rd party organization"); Console.WriteLine("-----------------------"); // Client will use Itarget interface to call functionality of adaptee class i.e. //ThirdPartyEmployee ITarget adapter = new EmployeeAdapter(); foreach (var employee in adapter.GetEmployees()) { Console.WriteLine(employee); } Console.ReadLine(); }