_Type.IsPublic 屬性

定義

為 COM 物件提供與版本無關的 IsPublic 屬性之存取權。Provides COM objects with version-independent access to the IsPublic property.

public:
 property bool IsPublic { bool get(); };
public bool IsPublic { get; }
member this.IsPublic : bool
Public ReadOnly Property IsPublic As Boolean

屬性值

Boolean

如果最上層 true 宣告為公用,則為 Type,否則為 falsetrue if the top-level Type is declared public; otherwise, false.

備註

這個屬性是用來從非受控程式碼存取 managed 類別,而且不應該從 managed 程式碼呼叫。This property is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.IsPublic 屬性會取得一個值,指出頂層 Type 是否宣告為公用。The Type.IsPublic property gets a value indicating whether the top-level Type is declared public.

適用於