TypeIdentifierAttribute 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個新的類別實例 TypeIdentifierAttribute 。
多載
| 名稱 | Description |
|---|---|
| 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 類別內部以 scope 私有成員的形式維護 和 identifier 參數。