Skip to content

Gendarme.Rules.Design.Generic.DoNotDeclareStaticMembersOnGenericTypesRule(2.10)

Sebastien Pouliot edited this page Jan 22, 2011 · 2 revisions

DoNotDeclareStaticMembersOnGenericTypesRule

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

Description

This rule checks for generic types that contain static members.

Examples

Bad example:

public class BadClass<T> {
    public static string member () {
    }
}

Good example:

public class GoodClass<T> {
    public string member () {
    }
}
Clone this wiki locally