Overriding an abstract property with a derived return type in c#
问题 I have four classes. Request, DerivedRequest, Handler, DerivedHandler. The Handler class has a property with the following declaration: public abstract Request request { get; set; } The DerivedHandler needs to override this property so that it returns DerivedRequest instead: public override DerivedRequest request { get; set; } Does anyone have any ideas about how to make this work? 回答1: This isn't really a good way to structure things. Do one of the following 1) Just don't change the return