TypeIdentifierAttribute 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建类的新实例 TypeIdentifierAttribute 。
重载
| 名称 | 说明 |
|---|---|
| TypeIdentifierAttribute() |
创建类的新实例 TypeIdentifierAttribute 。 |
| TypeIdentifierAttribute(String, String) |
使用指定的作用域和标识符创建类的新实例 TypeIdentifierAttribute 。 |
TypeIdentifierAttribute()
- Source:
- TypeIdentifierAttribute.cs
- Source:
- TypeIdentifierAttribute.cs
- Source:
- TypeIdentifierAttribute.cs
- Source:
- TypeIdentifierAttribute.cs
- Source:
- TypeIdentifierAttribute.cs
创建类的新实例 TypeIdentifierAttribute 。
public:
TypeIdentifierAttribute();
public TypeIdentifierAttribute();
Public Sub New ()
注解
此构造函数重载不接受参数。 因此,具有此属性的接口使用类型的 GUID 和简单名称来建立类型等效性。
适用于
TypeIdentifierAttribute(String, String)
- Source:
- TypeIdentifierAttribute.cs
- Source:
- TypeIdentifierAttribute.cs
- Source:
- TypeIdentifierAttribute.cs
- Source:
- TypeIdentifierAttribute.cs
- Source:
- TypeIdentifierAttribute.cs
使用指定的作用域和标识符创建类的新实例 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
第二种类型的等效字符串。
注解
参数scopeidentifier用于建立类型等效性。 它们合并为 GUID,并成为用于类型等效的键。 对于在其类型库中没有 GUID 的类型,此构造函数特别有用。
类TypeIdentifierAttribute在内部将和scope参数作为私有成员进行维护identifier。