DeprecatedAttribute attribute

DeprecatedAttribute attribute

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.

Syntax


var deprecatedAttribute = new Windows.Foundation.Metadata.DeprecatedAttribute(string,DeprecationType,UInt32);
var deprecatedAttribute = new Windows.Foundation.Metadata.DeprecatedAttribute(string,DeprecationType,UInt32,Platform);
var deprecatedAttribute = new Windows.Foundation.Metadata.DeprecatedAttribute(string,DeprecationType,UInt32,String);

Members

The DeprecatedAttribute attribute has these types of members:

Constructors

The DeprecatedAttribute attribute has these constructors.

ConstructorDescription
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.

 

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.FoundationContract, introduced version 1.0

Namespace

Windows.Foundation.Metadata
Windows::Foundation::Metadata [C++]

Metadata

Windows.Foundation.FoundationContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Foundation.Metadata
Windows::Foundation::Metadata [C++]

Metadata

Windows.winmd

Attributes

[AllowMultiple()]
[AttributeUsage(1887)]
[Version(0x6030000)]

See also

Object
Attribute

 

 

Show:
© 2016 Microsoft