C#


ROSLYN.DESIGN.CA1000 : Do not declare static members on generic types (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

When a static member of a generic type is called, the type argument must be specified for the type. When a generic instance member that does not support inference is called, the type argument must be specified for the member. In these two cases, the syntax for specifying the type argument is different and easily confused.

This check corresponds to Roslyn rule CA1000. For full rule details, see the Microsoft website: CA1000.

Properties

Class Name Do not declare static members on generic types (C#)
Significance reliability
Mnemonic ROSLYN.DESIGN.CA1000
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are enabled by default. To disable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += discard class="Do not declare static members on generic types (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.