Ok, I'm trying to do the following:
protected bool ValidAdvert(Base item)
{
throw ThisIsAnAbstractClassException();
}
protected bool ValidAdvert(Derived1 item)
{
return ADerived1SpecificPredicate;
}
protected bool ValidAdvert(Derived2 item)
{
return ADerived2SpecificPredicate;
}
And have the Derived class versions of the method be called, when a Base class is passed to the method. The base class is abstract so this should, in theory, be possible?
Before someone says something about overloading the method on the classes themselves, the logic inside the methods relies on a large number of different conditions, none of which are related, and none of which related to the Base/Derived class directly (such as login status, etc.)