Class A
{
virtual m1()
{
console.writeline("m1() in A");
}
}
Class B
{
override m1()
{
console.Writeline("m2() in B");
}
}
class C:B
{
override m1()
{
console.Writeline("m2() in c");
}
}
class D
{
main()
{
A a=new A();
a.m1(); ///m2() in B
B b=new B();
b.m1(); ///m2() in B
C c=new C();
c.m1() ///// what here will be called please le me know
}
}
also let me now can we use virtual and override together