Skip to content

Gendarme.Rules.Design.Generic.AvoidExcessiveParametersOnGenericTypesRule(git)

Sebastien Pouliot edited this page Mar 2, 2011 · 1 revision

AvoidExcessiveParametersOnGenericTypesRule

Assembly: Gendarme.Rules.Design.Generic
Version: git

Description

A visible type should not have more than two generic parameters. This makes it hard for consumers to remember what each parameter is required for.

Examples

Bad example:

public class BadClass<A, B, C> {
}

Good example:

public class GoodClass<A, B> {
}

Notes

  • This rule applies only to assemblies targeting .NET 2.0 and later.

Source code

You can browse the latest source code of this rule on github.com

Clone this wiki locally