USING SYSTEM; Public Class Animal {Public Virtual Void () {Console.write ("I am an animal");}
PUBLIC CLASS Chicken: Animals {Public Override Void called () {Console.Write ("Dog called");}} public class cat: Animal {public override void () {Console.write ("Cat called") ;}} Public class donkey: Animals {public override void called () {Console.write ("叫"); // is really difficult! }} public class test {public static void main () {animal [] dw = new animal [3]; AA [0] = new chicken (); aa [1] = new cat (); aa [2] = new (); Foreach (animal D IN DW) {d.bit (); // I rely, what happened to these animals? Is there any dissatisfaction? }}}