AccessibleObject.IReflect.GetProperty 方法

定義

多載

IReflect.GetProperty(String, BindingFlags)

取得 PropertyInfo 物件,其會對應到指定搜尋條件約束下的指定屬性。 如需這個成員的說明,請參閱 GetProperty(String, BindingFlags)

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

取得 PropertyInfo 物件,其會對應到具有指定搜尋條件約束的指定屬性。 如需這個成員的說明,請參閱 GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

IReflect.GetProperty(String, BindingFlags)

取得 PropertyInfo 物件,其會對應到指定搜尋條件約束下的指定屬性。 如需這個成員的說明,請參閱 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);
System.Reflection.PropertyInfo? IReflect.GetProperty (string name, System.Reflection.BindingFlags bindingAttr);
abstract member System.Reflection.IReflect.GetProperty : string * System.Reflection.BindingFlags -> System.Reflection.PropertyInfo
override this.System.Reflection.IReflect.GetProperty : string * System.Reflection.BindingFlags -> System.Reflection.PropertyInfo
Function GetProperty (name As String, bindingAttr As BindingFlags) As PropertyInfo Implements IReflect.GetProperty

參數

name
String

要尋找的屬性名稱。

bindingAttr
BindingFlags

繫結屬性,用來控制搜尋。

傳回

PropertyInfo

所找到屬性的 PropertyInfo 物件 (符合 bindingAttr 中所指定的搜尋條件約束) 或 null (如果未找到屬性)。

實作

例外狀況

物件會使用相同名稱,實作多重方法。

備註

這個成員是明確介面成員實作, 只有在 AccessibleObject 執行個體轉換成 IReflect 介面時,才能使用這個成員。

適用於

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

取得 PropertyInfo 物件,其會對應到具有指定搜尋條件約束的指定屬性。 如需這個成員的說明,請參閱 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);
System.Reflection.PropertyInfo? IReflect.GetProperty (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, Type? returnType, Type[] types, System.Reflection.ParameterModifier[]? modifiers);
abstract member System.Reflection.IReflect.GetProperty : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
override this.System.Reflection.IReflect.GetProperty : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
Function GetProperty (name As String, bindingAttr As BindingFlags, binder As Binder, returnType As Type, types As Type(), modifiers As ParameterModifier()) As PropertyInfo Implements IReflect.GetProperty

參數

name
String

要尋找的成員名稱。

bindingAttr
BindingFlags

繫結屬性,用來控制搜尋。

binder
Binder

可實作繫結器 (Binder) 的物件,繫結器包含與這個方法相關的屬性。

returnType
Type

陣列,用來在多載方法中選擇。

types
Type[]

參數修飾詞的陣列,用來進行與參數簽章的繫結工作,其中該參數簽章的類別已修改。

modifiers
ParameterModifier[]

陣列,用來選擇參數修飾詞。

傳回

PropertyInfo

PropertyInfo 物件 (用於所找到的屬性,如果在這個反映物件中找到具有指定名稱的屬性) 或 null (如果找不到屬性)。

實作

備註

這個成員是明確介面成員實作, 只有在 AccessibleObject 執行個體轉換成 IReflect 介面時,才能使用這個成員。

適用於