_Type.GetProperties _Type.GetProperties _Type.GetProperties _Type.GetProperties Method

定義

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

多載

GetProperties() GetProperties() GetProperties() GetProperties()

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

GetProperties(BindingFlags) GetProperties(BindingFlags) GetProperties(BindingFlags) GetProperties(BindingFlags)

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

備註

這個方法會從 unmanaged 程式碼,是用於存取 managed 類別,並不會呼叫從 managed 程式碼。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

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

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

傳回

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.

備註

這個方法會從 unmanaged 程式碼,是用於存取 managed 類別,並不會呼叫從 managed 程式碼。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

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

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

參數

bindingAttr
BindingFlags BindingFlags BindingFlags BindingFlags

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

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

傳回

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.

備註

這個方法會從 unmanaged 程式碼,是用於存取 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.

適用於