static void Main(string[] args) { Light light = new Light(); LightOnCommand lightOn = new LightOnCommand(light); RemoteControl rc = new RemoteControl(); rc.SetCommand(lightOn); rc.Invoke(); }
static void Main(string[] args) { Light light = new Light(); LightOnCommand lightOn = new LightOnCommand(light); RemoteControl rc = new RemoteControl(); rc.SetCommand(lightOn); rc.Invoke(); }