Share via


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

This attribute is intended to give developers some guidance as to what to do.   The contents of the attribute are displayed by the IDE when the user is using a feature like code analysis to give hints as to how to improve the code.

Constructors

Name Description
AdviceAttribute(String)

Properties

Name Description
Message

Applies to