ApiContractAttribute 类

定义

指定类型表示 API 协定。

public ref class ApiContractAttribute sealed : Attribute
/// [Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.Enum)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
class ApiContractAttribute final : Attribute
[Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.Enum)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
public sealed class ApiContractAttribute : Attribute
function ApiContractAttribute()
Public NotInheritable Class ApiContractAttribute
Inherits Attribute
继承
ApiContractAttribute
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.FoundationContract (在 v1.0 中引入)

构造函数

ApiContractAttribute()

创建并初始化 特性的新实例。

适用于