StaticAttribute 类

定义

指示仅包含静态方法的接口。

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

Windows 要求

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

注解

StaticAttribute 指定一个接口,其中包含语言投影作为类的静态方法提供的方法。 运行时类可以指定零个或多个静态属性。

运行时类可能具有 ActivatableAttribute 来指示可以构造类的实例。 此外,运行时类可能具有实例接口,这些接口指示语言投影在每个对象实例上提供的实例方法。

构造函数

StaticAttribute(Type, UInt32)

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

StaticAttribute(Type, UInt32, Platform)

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

StaticAttribute(Type, UInt32, String)

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

StaticAttribute(Type, UInt32, Type)

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

适用于

另请参阅