What is the difference between Two-way Adapter and Pluggable Adapter Pattern in C#?
问题 Both Two-way Adapter and Pluggable Adapter can access both the classes and also change the behavior of the method which is required to be changed. The following is my code: Two-Way Adapter public interface IAircraft { bool Airborne { get; } void TakeOff(); int Height { get; } } // Target public sealed class Aircraft : IAircraft { int height; bool airborne; public Aircraft() { height = 0; airborne = false; } public void TakeOff() { Console.WriteLine("Aircraft engine takeoff"); airborne = true;