L
lucas_denoir
I'm having some serious trouble accessing a virtual method of a base
class - that is not the immidate base class.
This is the basic situation that I have:
===========================================================
class A
{
public virtual string PrintMe()
{
return "Original A";
}
}
class B : A
{
public override string PrintMe()
{
return "Overriden B";
}
}
class C : B
{
public override string PrintMe()
{
return "Overriden C";
}
}
===========================================================
Now, what I'm trying to do is to from an instance of C call A's
PrintMe() method. I've tried various delegate twists, I've tried
reflection - without any luck. It insists on returning the top of the
virtual call table - C's PrintMe().
Any ideas or suggestions?
thanks
--Lucas
class - that is not the immidate base class.
This is the basic situation that I have:
===========================================================
class A
{
public virtual string PrintMe()
{
return "Original A";
}
}
class B : A
{
public override string PrintMe()
{
return "Overriden B";
}
}
class C : B
{
public override string PrintMe()
{
return "Overriden C";
}
}
===========================================================
Now, what I'm trying to do is to from an instance of C call A's
PrintMe() method. I've tried various delegate twists, I've tried
reflection - without any luck. It insists on returning the top of the
virtual call table - C's PrintMe().
Any ideas or suggestions?
thanks
--Lucas