Polymorphism and c#
Posted
by saurabh
on Stack Overflow
See other posts from Stack Overflow
or by saurabh
Published on 2010-03-16T15:10:16Z
Indexed on
2010/03/16
15:11 UTC
Read the original article
Hit count: 181
c#
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.
© Stack Overflow or respective owner