ExampleClass2 example2 = new ExampleClass2(); IControl control = example2; IAction action = example2;
// The following lines all call the same method. //example2.Move(); // Compiler error. control.Move(); // Calls IControl.Move on ExampleClass2. action.Move(); // Calls IAction.Move on ExampleClass2.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.