Share via


SuppressMessageAttribute.MessageId Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets an optional argument that expands on exclusion criteria.

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

Syntax

'Declaration
Public Property MessageId As String
public string MessageId { get; set; }

Property Value

Type: System.String
A string containing the expanded exclusion criteria.

Remarks

The MessageId property is an optional argument that specifies additional exclusion where the literal metadata target is not sufficiently precise. For example, the SuppressMessageAttribute cannot be applied within a method, and it may be desirable to suppress a violation against a statement in the method that will give a rule violation, but not against all statements in the method.

Version Information

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

Platforms

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