SuppressMessageAttribute Constructor
Collapse the table of content
Expand the table of content

SuppressMessageAttribute Constructor

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Initializes a new instance of the SuppressMessageAttribute class, specifying the category of the static analysis tool and the identifier for an analysis rule.

Namespace:  System.Diagnostics.CodeAnalysis
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Sub New ( _
	category As String, _
	checkId As String _
)

Parameters

category
Type: System.String
The category for the attribute.
checkId
Type: System.String
The identifier of the analysis tool rule the attribute applies to.

The category parameter value is specific to the analysis tool and categorizes the rule identified by the checkId parameter. When concatenated, the two parameters form a unique identifier for the rule.

NoteNote:

The preprocessor symbol "CODE_ANALYSIS" must be defined for this attribute to be effective. The absence of the preprocessor symbol results in the attribute not being applied.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft