Gendarme.Rules.Performance.AvoidUnusedParametersRule Class
This rule is used to ensure that all parameters in a method signature are being used. The rule wont report a defect against the following: [The '' type of list has not been implemented in the ECMA stylesheet.]

See Also: AvoidUnusedParametersRule Members

Syntax

[Gendarme.Framework.EngineDependency(typeof(Gendarme.Framework.Engines.OpCodeEngine, Gendarme.Framework, Version=2.8.0.0, Culture=neutral, PublicKeyToken=null))]
[Gendarme.Framework.FxCopCompatibility("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
[Gendarme.Framework.Problem("The method contains one or more unused parameters.")]
[Gendarme.Framework.Solution("You should remove or use the unused parameters.")]
public class AvoidUnusedParametersRule : Gendarme.Framework.Rule, Gendarme.Framework.IMethodRule

Remarks

Documentation for this section has not yet been entered.

Example

Bad example:

Example

            public void MethodWithUnusedParameters (IEnumerable enumerable, int x)
            {
            	foreach (object item in enumerable) {
            		Console.WriteLine (item);
            	}
            }
            

Example

Good example:

Example

            public void MethodWithUsedParameters (IEnumerable enumerable)
            {
            	foreach (object item in enumerable) {
            		Console.WriteLine (item);
            	}
            }
            

Requirements

Namespace: Gendarme.Rules.Performance
Assembly: Gendarme.Rules.Performance (in Gendarme.Rules.Performance.dll)
Assembly Versions: 2.8.0.0