Polymorphism and c#
- by saurabh
Here one more basic question asked in MS interview recently
Class A {
public virtual void Method1(){}
public void Method2() {
Method1(); }
}
class B:A { public override void Method1() { } }
Class main
{
A obk = new B(); obk.Method2(); }
now tell me which function gets called ? sorry for the typos.