_Type.GetProperties Method

Definition

為 COM 物件提供與版本無關的 GetProperties 方法之存取權。Provides COM objects with version-independent access to the GetProperties method.

Overloads

GetProperties()

為 COM 物件提供與版本無關的 GetProperties() 方法之存取權。Provides COM objects with version-independent access to the GetProperties() method.

GetProperties(BindingFlags)

為 COM 物件提供與版本無關的 GetProperties(BindingFlags) 方法之存取權。Provides COM objects with version-independent access to the GetProperties(BindingFlags) method.

Remarks

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

Type.GetProperties 方法會取得目前 Type的屬性。The Type.GetProperties method gets the properties of the current Type.

GetProperties()

為 COM 物件提供與版本無關的 GetProperties() 方法之存取權。Provides COM objects with version-independent access to the GetProperties() method.

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

Returns

PropertyInfo[]

PropertyInfo 物件的陣列,代表目前 Type 的所有公用屬性。An array of PropertyInfo objects representing all public properties of the current Type.

-或--or- 類型 PropertyInfo 的空陣列,如果目前 Type 並沒有公用屬性。An empty array of type PropertyInfo, if the current Type does not have public properties.

Remarks

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

Type.GetProperties 方法會傳回目前 Type的所有公用屬性。The Type.GetProperties method returns all the public properties of the current Type.

GetProperties(BindingFlags)

為 COM 物件提供與版本無關的 GetProperties(BindingFlags) 方法之存取權。Provides COM objects with version-independent access to the GetProperties(BindingFlags) method.

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()

Parameters

bindingAttr
BindingFlags

位元遮罩,由一或多個 BindingFlags 組成,而這些旗標會指定執行搜尋的方式。A bitmask comprised of one or more BindingFlags that specify how the search is conducted.

-或--or- 零,傳回 nullZero, to return null.

Returns

PropertyInfo[]

PropertyInfo 物件的陣列,代表目前 Type 中符合指定繫結條件約束的所有屬性。An array of PropertyInfo objects representing all properties of the current Type that match the specified binding constraints.

-或--or- 如果目前 PropertyInfo 沒有屬性,或沒有屬性符合繫結條件約束,則為 Type 類型的空陣列。An empty array of type PropertyInfo, if the current Type does not have properties, or if none of the properties match the binding constraints.

Remarks

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

Type.GetProperties 方法會使用指定的系結條件約束,搜尋目前 Type的屬性。The Type.GetProperties method searches for the properties of the current Type, using the specified binding constraints.

Applies to