virtual void MyMethod()
{
DoOneThing();
}
I want to implement DoAnotherThing()
along with DoOneThing()
here-
override void MyMethod()
{
//DoOneThing() also.
DoAnotherThing();
}
Is it possible at all?
virtual void MyMethod()
{
DoOneThing();
}
I want to implement DoAnotherThing()
along with DoOneThing()
here-
override void MyMethod()
{
//DoOneThing() also.
DoAnotherThing();
}
Is it possible at all?
Here small example
abstract class Foo
{
public virtual void MyMethod()
{
Console.WriteLine("DoOneThing");
}
}
class MegaFoo : Foo
{
public override void MyMethod()
{
base.MyMethod(); // call Foo.MyMethod
Console.WriteLine("DoAnotherThing");
}
}