StaticAttribute StaticAttribute StaticAttribute StaticAttribute Class

Indicates an interface that contains only static methods.

Syntax

Declaration

public sealed class StaticAttributepublic sealed class StaticAttributePublic NotInheritable Class StaticAttributepublic sealed class StaticAttribute

Remarks

The StaticAttribute specifies an interface with methods that language projections supply as static methods of the class. A runtime class may specify zero or more static attributes.

A runtime class may have an ActivatableAttribute to indicate that instances of the class can be constructed. Also, a runtime class may have instance interfaces, which indicate the instance methods that language projections supply on each object instance.

Constructors summary

Creates and initializes a new instance of the attribute.

Creates and initializes a new instance of the attribute.

Creates and initializes a new instance of the attribute.

Constructors

  • StaticAttribute(Type, UInt32)
    StaticAttribute(Type, UInt32)
    StaticAttribute(Type, UInt32)
    StaticAttribute(Type, UInt32)

    Creates and initializes a new instance of the attribute.

    public StaticAttribute(Type type, UInt32 version)public New(Type type, UInt32 version)Public Sub New(type As Type, version As UInt32)public StaticAttribute(Type type, UInt32 version)

    Parameters

    • type
      System.Type
      System.Type
      System.Type
      System.Type

      The type that contains the static methods for the runtime class.

    • version
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The version in which the static interface was added.

  • StaticAttribute(Type, UInt32, String)
    StaticAttribute(Type, UInt32, String)
    StaticAttribute(Type, UInt32, String)
    StaticAttribute(Type, UInt32, String)

    Creates and initializes a new instance of the attribute.

    public StaticAttribute(Type type, UInt32 version, String contractName)public New(Type type, UInt32 version, String contractName)Public Sub New(type As Type, version As UInt32, contractName As String)public StaticAttribute(Type type, UInt32 version, String contractName)

    Parameters

    • type
      System.Type
      System.Type
      System.Type
      System.Type

      The type that contains the static methods for the runtime class.

    • version
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The version of the API Contract in which the static factory was added to the runtime class's activation factory.

    • contractName
      System.String
      System.String
      System.String
      System.String

      A string representing the type of the API contract implementing the class.

  • StaticAttribute(Type, UInt32, Platform)
    StaticAttribute(Type, UInt32, Platform)
    StaticAttribute(Type, UInt32, Platform)
    StaticAttribute(Type, UInt32, Platform)

    Creates and initializes a new instance of the attribute.

    public StaticAttribute(Type type, UInt32 version, Platform platform)public New(Type type, UInt32 version, Platform platform)Public Sub New(type As Type, version As UInt32, platform As Platform)public StaticAttribute(Type type, UInt32 version, Platform platform)

    Parameters

    • type
      System.Type
      System.Type
      System.Type
      System.Type

      The type that contains the static methods for the runtime class.

    • version
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The version in which the static interface was added.

    • platform

      A value of the enumeration. The default is Windows.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.FoundationContract (introduced v1)

Attributes

Windows.Foundation.Metadata.AllowMultipleAttribute
Windows.Foundation.Metadata.AttributeUsageAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Foundation.Metadata.dll