DeprecatedAttribute Classe

Definizione

Indica che un tipo o un membro devono essere contrassegnati nei metadati come deprecati. I compilatori e altri strumenti di sviluppo possono leggere questo attributo e fornire informazioni all'utente sul tipo di deprecazione e sulle possibili alternative.

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 final : 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
Ereditarietà
DeprecatedAttribute
Attributi

Requisiti Windows

Famiglia di dispositivi
Windows 10 (è stato introdotto in 10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (è stato introdotto in v1.0)

Costruttori

DeprecatedAttribute(String, DeprecationType, UInt32)

Crea e inizializza una nuova istanza dell'attributo.

DeprecatedAttribute(String, DeprecationType, UInt32, Platform)

Crea e inizializza una nuova istanza dell'attributo, incluso un valore della piattaforma per la destinazione.

DeprecatedAttribute(String, DeprecationType, UInt32, String)

Crea e inizializza una nuova istanza dell'attributo.

DeprecatedAttribute(String, DeprecationType, UInt32, Type)

Crea e inizializza una nuova istanza dell'attributo.

Si applica a