Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SuppressMessageAttribute Constructor

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)
public SuppressMessageAttribute(
	string category,
	string checkId
)

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.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.