I have a base class like this:
class FooBase
{
public bool Do(int p) { /* Return stuff. */ }
}
And a child class like this:
<
You could build a base class that is abstract with a protected Do
method, and rewrite your current FooBase
class to inherit from Foo
:
public abstract class FooBaseAbstract
{
protected bool Do(int p)
{
return true;
}
}
// You can use this one just as your current FooBase class
public class FooBase : Foo
{
}
public class Foo : FooBaseAbstract
{
public bool Do(T p)
{
if (true /* some test here */)
{
return base.Do(4);
}
return false;
}
}
(of course change the class names)