Exact difference between overriding and hiding
Can anybody tell the working of overriding and hiding in terms of memory and references. class A { public virtual void Test1() { //Impl 1} public virtual void Test2() { //Impl 2} } class B : A { public override void Test1() { //Impl 3} public new void Test2() { Impl 4} } static Main() { A aa=new B() //This will give memory to B aa.Test1(); //What happens in terms of memory when this executes aa.Test2(); //-----------------------SAME------------------------ } Here memory is with class B but in the second statement aa.Test2 class A's method will be called. Why is it? If B has memory then B's