How to Override superclass property value using a bespoke implementation?
<p>I have a superclass "Entity" in a logic-tier project within existing 3-tier "core" application code, from which 2 concrete classes "RiskEntity" and "PolicyEntity" inherit (in that same core project). The superclass possesses a public property "Loss" which is not overridden by the 2 subclasses. This property is used by other code within this core project. The implementation of that property refers to other classes/properties within that core project.</p>

<p>For a particular use case, I require the propery's getter to be implemented differently. If possible, I'd like that bespoke implementation to exist outside of the "core" C# project mentioned above, and I'd like the application to be configurable so as to instruct it to use that bespoke implementation whenever that property is referenced from within my core project.</p>

<p>Can anyone point me to an elegant pattern/technique to achieve this? I've wondered about using a helper interface within the getter, and using reflection to instantiate the correct implementation of that interface, based on (say) a project setting. But even if this is along the right lines, I'm not sure how the bespoke implementation could live outside of the core project code.</p>

<p>Alternative suggestions also welcome. Thanks.</p>
