I have four classes. Request, DerivedRequest, Handler, DerivedHandler. The Handler class has a property with the following declaration:
public abstract Request
Edit:
You can't change the type on a derived type, but new
might help:
In the derived type...
public new DerivedRequest request
{
get{return (DerivedRequest) base.request;}
set{base.request = value;}
}
public override Request request
{
get{return base.request;}
set{base.request = (DerivedRequest) value;} // Throws InvalidCastException if misused.
}