InheritanceAttribute 類別
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
指示與這個屬性相關的元件是否已經繼承自基底類別。 此類別無法獲得繼承。
public ref class InheritanceAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Property)]
public sealed class InheritanceAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Property)>]
type InheritanceAttribute = class
inherit Attribute
Public NotInheritable Class InheritanceAttribute
Inherits Attribute
- 繼承
- 屬性
InheritanceAttribute 表示成員的型別和繼承層級。
當的 AddInheritedComponentsIInheritanceService 方法搜尋元件的元件欄位以識別繼承自基類的欄位時,此方法會使用 InheritanceAttribute來表示每個元件的繼承層級。
Inheritance |
初始化 InheritanceAttribute 類別的新執行個體。 |
Inheritance |
使用指定的繼承層級,初始化 InheritanceAttribute 類別的新執行個體。 |
Default |
指定 InheritanceAttribute 的預設值為 NotInherited。 此欄位為唯讀。 |
Inherited |
指定元件已繼承。 此欄位為唯讀。 |
Inherited |
指定元件已繼承且為唯讀。 此欄位為唯讀。 |
Not |
指定元件並未繼承。 此欄位為唯讀。 |
Inheritance |
取得或設定儲存在這個屬性中的目前繼承層級。 |
Type |
在衍生類別中實作時,取得這個 Attribute 的唯一識別碼。 (繼承來源 Attribute) |
Equals(Object) |
覆寫以測試是否相等。 |
Get |
傳回這個物件的雜湊程式碼。 |
Get |
取得目前執行個體的 Type。 (繼承來源 Object) |
Is |
取得值,指出目前屬性值是否為屬性的預設值。 |
Match(Object) |
在衍生類別中覆寫時,會傳回值,表示這個執行個體是否等於指定物件。 (繼承來源 Attribute) |
Memberwise |
建立目前 Object 的淺層複製。 (繼承來源 Object) |
To |
將這個屬性轉換成字串。 |
_Attribute. |
將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。 (繼承來源 Attribute) |
_Attribute. |
擷取物件的類型資訊,可以用來取得介面的類型資訊。 (繼承來源 Attribute) |
_Attribute. |
擷取物件提供的類型資訊介面數目 (0 或 1)。 (繼承來源 Attribute) |
_Attribute. |
提供物件所公開的屬性和方法的存取權。 (繼承來源 Attribute) |
產品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |