Language

AdviceAttribute Class

Definition

An attribute that can be used to give programming advice to a user of a function or class.

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public class AdviceAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
type AdviceAttribute = class
    inherit Attribute
Inheritance
AdviceAttribute
Derived
Attributes

Remarks

Development tools can display the advice during code analysis to suggest improvements.

Constructors

Name Description
AdviceAttribute(String)

Creates an advice attribute with the specified message.

Properties

Name Description
Message

Gets the programming advice.

Applies to