TypeBuilder.GetPropertyImpl 方法

定义

当在派生类中重写时,使用指定的绑定约束搜索其参数与指定的参数类型和修饰符匹配的指定属性。

protected:
 override System::Reflection::PropertyInfo ^ GetPropertyImpl(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, Type ^ returnType, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
protected override System.Reflection.PropertyInfo GetPropertyImpl (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, Type? returnType, Type[]? types, System.Reflection.ParameterModifier[]? modifiers);
protected override System.Reflection.PropertyInfo GetPropertyImpl (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, Type returnType, Type[] types, System.Reflection.ParameterModifier[] modifiers);
override this.GetPropertyImpl : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
Protected Overrides Function GetPropertyImpl (name As String, bindingAttr As BindingFlags, binder As Binder, returnType As Type, types As Type(), modifiers As ParameterModifier()) As PropertyInfo

参数

name
String

包含要获取的属性名的字符串。

bindingAttr
BindingFlags

枚举值的按位组合,这些值指定如何进行搜索。

若为 Default,则返回 null

binder
Binder

一个对象,该对象定义一组属性并启用绑定,而绑定可能涉及选择重载成员、强制自变量类型和通过反射调用成员。

要使用 Nothing 的空引用(在 Visual Basic 中为 DefaultBinder)。

returnType
Type

属性的返回类型。

types
Type[]

一个 Type 对象数组,表示要获取的索引属性的参数的数目、顺序和类型。

获取未被索引的属性的 Type 类型的空数组(即 Type[] types = new Type[0])。

modifiers
ParameterModifier[]

ParameterModifier 对象的数组,表示与 types 数组中的相应元素关联的特性。 默认的联编程序不处理此参数。

返回

表示符合指定需求的属性的对象(如果找到的话);否则为 null

适用于