using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Adapter { class Client { private bool vgaMonitor = true; public void HowToUse() { IAdapter hdmi; if (vgaMonitor) hdmi = new HdmiToVgaAdapter(); else hdmi = new HdmiAdapter(); byte[] data = new byte[] { byte.MinValue, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, byte.MaxValue }; DisplyData(hdmi, data); } private void DisplyData(IAdapter adapter, byte[] data) { adapter.Disply(data); } } }