DeprecatedAttribute Class

Definition

Indicates that a type or member should be marked in metadata as deprecated. Compilers and other developer tools can read this attribute and provide info to the user about the deprecation type and possible alternates.

public ref class DeprecatedAttribute sealed : Attribute
/// [Windows.Foundation.Metadata.AllowMultiple]
/// [Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.RuntimeClass | System.AttributeTargets.Struct)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
class DeprecatedAttribute sealed : Attribute
[Windows.Foundation.Metadata.AllowMultiple]
[Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.RuntimeClass | System.AttributeTargets.Struct)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
public sealed class DeprecatedAttribute : Attribute
Public NotInheritable Class DeprecatedAttribute
Inherits Attribute
Inheritance
DeprecatedAttribute
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (introduced in v1.0)

Constructors

DeprecatedAttribute(String, DeprecationType, UInt32)

Creates and initializes a new instance of the attribute.

DeprecatedAttribute(String, DeprecationType, UInt32, Platform)

Creates and initializes a new instance of the attribute, including a Platform value for targeting.

DeprecatedAttribute(String, DeprecationType, UInt32, String)

Creates and initializes a new instance of the attribute.

DeprecatedAttribute(String, DeprecationType, UInt32, Type)

Applies to

See also