共用方式為


PreviousContractVersionAttribute 類別

定義

表示類型先前與不同的 API 合約相關聯。

public ref class PreviousContractVersionAttribute 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.InterfaceImpl | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.RuntimeClass | System.AttributeTargets.Struct)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
class PreviousContractVersionAttribute 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.InterfaceImpl | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.RuntimeClass | System.AttributeTargets.Struct)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
public sealed class PreviousContractVersionAttribute : Attribute
function PreviousContractVersionAttribute(contract, versionLow, versionHigh, newContract)
Public NotInheritable Class PreviousContractVersionAttribute
Inherits Attribute
繼承
PreviousContractVersionAttribute
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.FoundationContract (已於 v1.0 引進)

備註

如果類型已從一個 API 合約移至另一個類型,就會存在這個屬性。 它表示類型與其存在之 API 合約相關的歷程記錄。

建構函式

PreviousContractVersionAttribute(String, UInt32, UInt32)

建立並初始化 屬性的新實例。

PreviousContractVersionAttribute(String, UInt32, UInt32, String)

建立並初始化 屬性的新實例。

PreviousContractVersionAttribute(Type, UInt32, UInt32)

建立並初始化 屬性的新實例。

PreviousContractVersionAttribute(Type, UInt32, UInt32, Type)

建立並初始化 屬性的新實例。

適用於