-
Notifications
You must be signed in to change notification settings - Fork 4
Gendarme.Rules.Naming.ParameterNamesShouldMatchOverriddenMethodRule(git)
Assembly: Gendarme.Rules.Naming
Version: git
This rule warns if an overriden method's parameter names does not match those of the base class or those of the implemented interface. This can be confusing because it may not always be clear that it is an override or implementation of an interface method. It also makes it more difficult to use the method with languages that support named parameters (like C# 4.0).
Bad example:
public class Base {
public abstract void Write (string text);
}
public class SubType : Base {
public override void Write (string output)
{
//...
}
}
Good example:
public class Base {
public abstract void Write (string text);
}
class SubType : Base {
public override void Write (string text)
{
//...
}
}
You can browse the latest source code of this rule on github.com
Note that this page was autogenerated (3/17/2011 1:55:44 PM) based on the xmldoc
comments inside the rules source code and cannot be edited from this wiki.
Please report any documentation errors, typos or suggestions to the
Gendarme Mailing List. Thanks!