DeprecatedAttribute Klasse

Definition

Gibt an, dass ein Typ oder Member in den Metadaten als veraltet gekennzeichnet werden soll. Compiler und andere Entwicklertools können dieses Attribut lesen und dem Benutzer Informationen zum veralteten Typ und möglichen Alternativen bereitstellen.

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
Vererbung
DeprecatedAttribute
Attribute

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (eingeführt in v1.0)

Konstruktoren

DeprecatedAttribute(String, DeprecationType, UInt32)

Erstellt und initialisiert eine neue instance des Attributs.

DeprecatedAttribute(String, DeprecationType, UInt32, Platform)

Erstellt und initialisiert eine neue instance des Attributs, einschließlich eines Platform-Werts für das Targeting.

DeprecatedAttribute(String, DeprecationType, UInt32, String)

Erstellt und initialisiert eine neue instance des Attributs.

DeprecatedAttribute(String, DeprecationType, UInt32, Type)

Erstellt und initialisiert eine neue instance des Attributs.

Gilt für: