class A
   {
        public void MethodA()
        {
            ...
        }
    }
 
    class B : A
    {
        public void MethodB()
        {
            ...
        }
    }
 .

.

.

.

.

.


    A a = new B(); 

    a.MethodA();

    a.MethodB();        // error





그냥 표면적으로는 알겠는데


어떻게 구현이 가능한지 모르겠음


어떻게 부모 클래스 타입으로 선언한 a에다가 B를 생성할 수가 있음????