AccessibleObject.IReflect.GetProperty 方法

定義

多載

IReflect.GetProperty(String, BindingFlags)

取得 PropertyInfo 物件,其會對應到指定搜尋條件約束下的指定屬性。Gets a PropertyInfo object corresponding to a specified property under specified search constraints. 如需這個成員的說明,請參閱 GetProperty(String, BindingFlags)For a description of this member, see GetProperty(String, BindingFlags).

IReflect.GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

取得 PropertyInfo 物件,其會對應到具有指定搜尋條件約束的指定屬性。Gets a PropertyInfo object corresponding to a specified property with specified search constraints. 如需這個成員的說明,請參閱 GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])For a description of this member, see GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]).

IReflect.GetProperty(String, BindingFlags)

取得 PropertyInfo 物件,其會對應到指定搜尋條件約束下的指定屬性。Gets a PropertyInfo object corresponding to a specified property under specified search constraints. 如需這個成員的說明,請參閱 GetProperty(String, BindingFlags)For a description of this member, see GetProperty(String, BindingFlags).

 virtual System::Reflection::PropertyInfo ^ System.Reflection.IReflect.GetProperty(System::String ^ name, System::Reflection::BindingFlags bindingAttr) = System::Reflection::IReflect::GetProperty;
System.Reflection.PropertyInfo IReflect.GetProperty (string name, System.Reflection.BindingFlags bindingAttr);
Function GetProperty (name As String, bindingAttr As BindingFlags) As PropertyInfo Implements IReflect.GetProperty

參數

name
String

要尋找的屬性名稱。The name of the property to find.

bindingAttr
BindingFlags

繫結屬性,用來控制搜尋。The binding attributes used to control the search.

傳回

所找到屬性的 PropertyInfo 物件 (符合 bindingAttr 中所指定的搜尋條件約束) 或 null (如果未找到屬性)。A PropertyInfo object for the located property that meets the search constraints specified in bindingAttr, or null if the property was not located.

實作

例外狀況

物件會使用相同名稱,實作多重方法。The object implements multiple methods with the same name.

備註

這個成員是明確介面成員實作,This member is an explicit interface member implementation. 只有在 AccessibleObject 執行個體轉換成 IReflect 介面時,才能使用這個成員。It can be used only when the AccessibleObject instance is cast to an IReflect interface.

IReflect.GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

取得 PropertyInfo 物件,其會對應到具有指定搜尋條件約束的指定屬性。Gets a PropertyInfo object corresponding to a specified property with specified search constraints. 如需這個成員的說明,請參閱 GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])For a description of this member, see GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]).

 virtual System::Reflection::PropertyInfo ^ System.Reflection.IReflect.GetProperty(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, Type ^ returnType, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers) = System::Reflection::IReflect::GetProperty;
System.Reflection.PropertyInfo IReflect.GetProperty (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, Type returnType, Type[] types, System.Reflection.ParameterModifier[] modifiers);

參數

name
String

要尋找的成員名稱。The name of the member to find.

bindingAttr
BindingFlags

繫結屬性,用來控制搜尋。The binding attributes used to control the search.

binder
Binder

可實作繫結器 (Binder) 的物件,繫結器包含與這個方法相關的屬性。An object that implements Binder, containing properties related to this method.

returnType
Type

陣列,用來在多載方法中選擇。An array used to choose among overloaded methods.

types
Type[]

參數修飾詞的陣列,用來進行與參數簽章的繫結工作,其中該參數簽章的類別已修改。An array of parameter modifiers used to make binding work with parameter signatures in which the types have been modified.

modifiers
ParameterModifier[]

陣列,用來選擇參數修飾詞。An array used to choose the parameter modifiers.

傳回

PropertyInfo 物件 (用於所找到的屬性,如果在這個反映物件中找到具有指定名稱的屬性) 或 null (如果找不到屬性)。A PropertyInfo object for the located property, if a property with the specified name was located in this reflection object, or null if the property was not located.

實作

備註

這個成員是明確介面成員實作,This member is an explicit interface member implementation. 只有在 AccessibleObject 執行個體轉換成 IReflect 介面時,才能使用這個成員。It can be used only when the AccessibleObject instance is cast to an IReflect interface.

適用於