예제 #1
0
	static void Main()
	{
		cDog ob2 = new cDog();
		cMammal ob1 = (cMammal)ob2;
		ob1.speak();
		ob2.speak();
	}
예제 #2
0
	static void Main()
	{
		cDog ob2 = new cDog();
		cMammal ob1 = (cMammal)ob2;
		//Notice that "Grunt" is still outputted EVEN though it is a dog?
		ob1.speak();
		ob2.speak();
	}
예제 #3
0
    static void Main()
    {
        cDog    ob2 = new cDog();
        cMammal ob1 = (cMammal)ob2;

        ob1.speak();
        ob2.speak();
    }
    static void Main()
    {
        cDog    ob2 = new cDog();
        cMammal ob1 = (cMammal)ob2;

        //Notice that "Grunt" is still outputted EVEN though it is a dog?
        ob1.speak();
        ob2.speak();
    }