AccessibleObject.IReflect.GetProperty AccessibleObject.IReflect.GetProperty AccessibleObject.IReflect.GetProperty Method

定义

重载

IReflect.GetProperty(String, BindingFlags) IReflect.GetProperty(String, BindingFlags) 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[]) 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) IReflect.GetProperty(String, BindingFlags) 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 String String

要查找的属性的名称。The name of the property to find.

bindingAttr
BindingFlags BindingFlags BindingFlags

用于控制搜索的绑定属性。The binding attributes used to control the search.

返回

找到的与 bindingAttr 中指定的搜索约束相符的属性的 PropertyInfo 对象;如果没有找到此属性,则为 nullA 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[]) 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 String String

要查找的成员的名称。The name of the member to find.

bindingAttr
BindingFlags BindingFlags BindingFlags

用于控制搜索的绑定属性。The binding attributes used to control the search.

binder
Binder Binder Binder

实现 Binder 的对象,它包含与此方法相关的属性。An object that implements Binder, containing properties related to this method.

returnType
Type Type 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 对象;如果没有找到此属性,则为 nullA 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.

适用于