_Type.GetProperties 方法

定義

為 COM 物件提供與版本無關的 GetProperties 方法之存取權。

多載

GetProperties()

為 COM 物件提供與版本無關的 GetProperties() 方法之存取權。

GetProperties(BindingFlags)

為 COM 物件提供與版本無關的 GetProperties(BindingFlags) 方法之存取權。

備註

此方法適用於從 Unmanaged 程式代碼存取 Managed 類別,不應從 Managed 程式代碼呼叫。

方法 Type.GetProperties 會取得目前 Type的屬性。

GetProperties()

為 COM 物件提供與版本無關的 GetProperties() 方法之存取權。

public:
 cli::array <System::Reflection::PropertyInfo ^> ^ GetProperties();
public System.Reflection.PropertyInfo[] GetProperties ();
abstract member GetProperties : unit -> System.Reflection.PropertyInfo[]
Public Function GetProperties () As PropertyInfo()

傳回

PropertyInfo 物件的陣列,代表目前 Type 的所有公用屬性。

-或-

類型 PropertyInfo 的空陣列,如果目前 Type 並沒有公用屬性。

備註

此方法適用於從 Unmanaged 程式代碼存取 Managed 類別,不應從 Managed 程式代碼呼叫。

方法 Type.GetProperties 會傳回目前 Type的所有公用屬性。

適用於

GetProperties(BindingFlags)

為 COM 物件提供與版本無關的 GetProperties(BindingFlags) 方法之存取權。

public:
 cli::array <System::Reflection::PropertyInfo ^> ^ GetProperties(System::Reflection::BindingFlags bindingAttr);
public System.Reflection.PropertyInfo[] GetProperties (System.Reflection.BindingFlags bindingAttr);
abstract member GetProperties : System.Reflection.BindingFlags -> System.Reflection.PropertyInfo[]
Public Function GetProperties (bindingAttr As BindingFlags) As PropertyInfo()

參數

bindingAttr
BindingFlags

位元遮罩,由一或多個 BindingFlags 組成,而這些旗標會指定執行搜尋的方式。

-或-

零,傳回 null

傳回

PropertyInfo 物件的陣列,代表目前 Type 中符合指定繫結條件約束的所有屬性。

-或-

如果目前 PropertyInfo 沒有屬性,或沒有屬性符合繫結條件約束,則為 Type 類型的空陣列。

備註

此方法適用於從 Unmanaged 程式代碼存取 Managed 類別,不應從 Managed 程式代碼呼叫。

方法會 Type.GetProperties 使用指定的系結條件約束,搜尋目前 Type的屬性。

適用於