When an interface inherits from two interfaces that both define a member with the same name, trying to access that member through the derived interface will result in the compiler error ``++CS0229 Ambiguity between 'IBase1.SomeProperty' and 'IBase2.SomeProperty'++``.
So instead, every caller will be forced to cast instances of the derived interface to one or the other of its base interfaces to resolve the ambiguity and be able to access the member. Instead, it is better to resolve the ambiguity in the definition of the derived interface either by:
* renaming the member in one of the base interfaces to remove the collision
* also defining that member in the derived interface. Use this only if all copies of the member are meant to hold the same value.
\[~ann.campbell.2] LGTM. (changed the message and the code samples)
=== on 8 Dec 2015, 15:12:11 Ann Campbell wrote:
\[~tamas.vajk] I've updated the SQALE remediation (constant to linear) to correspond to your message change
=== on 1 Dec 2016, 14:10:33 Tamas Vajk wrote:
\[~ann.campbell.2] I know it's not ideal, but I'm reverting this back to a constant effort rule. We're migrating to Rule-API based descriptions, and in .NET we don't have linear regression function support.