16 lines
786 B
Plaintext
16 lines
786 B
Plaintext
== Why is this an issue?
|
|
|
|
Parameters are part of the {methodSignatureLine}[method signature] and its identity.
|
|
|
|
Implementing a method from an interface, a base class, or a partial method and changing one of its parameters' names will confuse and impact the method's readability.
|
|
|
|
include::{noncompliantCode}[]
|
|
|
|
To avoid any ambiguity in the code, a parameter's name should match the initial declaration, whether its initial declaration is from an interface, a base class, or a partial method.
|
|
|
|
include::{compliantCode}[]
|
|
|
|
=== Exceptions
|
|
The rule is ignored if both the parameter defined in the initial decalaration is a generic type and the implementing member's declaration is a non-generic type.
|
|
|
|
This allows the implementing member to be more specific and provide more information. |