2.3 Virtual Method Use Virtul to define this method as a virtual method.
2.3.1 Relationships of the method use the Override keyword to redefine a virtual method. Can't pay attention here. The implicit hidden is hidden using New. Hide is just hidden in the subclass, but does not affect the method of the parent class. Class a {public method () {public method () {{public method () {} A aclass = new a (); aclass.method (); // Call a Method () a aclass = new B (); aclass.method (); // Call the method () b bclass = new b () b (); bclass.method (); // call b bclass = new a (); / / Compilation Unable to pass // Class a {}} Class B: a {public override method () {public override method () {}} a aclass = new a (); aclass.method (); // call A Method () a aclass = new b (); aclass.method (); // Call the method () b bclass = new b () B (); bclass.method (); // Call the Method () B in B BCLASS = new a (); // Compiling cannot pass