TypeIdentifierAttribute 构造函数

定义

创建 TypeIdentifierAttribute 类的新实例。

重载

TypeIdentifierAttribute()

创建 TypeIdentifierAttribute 类的新实例。

TypeIdentifierAttribute(String, String)

用指定的范围和标识符创建 TypeIdentifierAttribute 类的新实例。

TypeIdentifierAttribute()

创建 TypeIdentifierAttribute 类的新实例。

public:
 TypeIdentifierAttribute();
public TypeIdentifierAttribute ();
Public Sub New ()

注解

此构造函数重载不接受参数。 因此,具有此属性的接口使用类型的 GUID 和简单名称来建立类型等效。

适用于

TypeIdentifierAttribute(String, String)

用指定的范围和标识符创建 TypeIdentifierAttribute 类的新实例。

public:
 TypeIdentifierAttribute(System::String ^ scope, System::String ^ identifier);
public TypeIdentifierAttribute (string scope, string identifier);
public TypeIdentifierAttribute (string? scope, string? identifier);
new System.Runtime.InteropServices.TypeIdentifierAttribute : string * string -> System.Runtime.InteropServices.TypeIdentifierAttribute
Public Sub New (scope As String, identifier As String)

参数

scope
String

第一个类型等效性字符串。

identifier
String

第二个类型等效性字符串。

注解

scope``identifier参数用于建立类型等效性。 它们合并为 GUID,并成为用于类型等效的键。 对于类型库中没有 GUID 的类型,此构造函数特别有用。

TypeIdentifierAttribute在内部将参数identifier维护scope为私有成员。

适用于