コード例 #1
0
        static void Main(string[] args)
        {
			MyDerivedClass derived = new MyDerivedClass();
			MyBaseClass mybc = (MyBaseClass)derived; // Cast to base class

			derived.Print();	// Call Print from derived portion.
			mybc.Print();		// Call Print from base portion.
		}
コード例 #2
0
        static void Main(string[] args)
        {
			MyDerivedClass derived = new MyDerivedClass();
			MyBaseClass mybc = (MyBaseClass)derived; // Cast to base class

			derived.Print();
			mybc.Print();
		}