TypeBuilder.GetPropertyImpl 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当在派生类中重写时,使用指定的绑定约束搜索其参数与指定的参数类型和修饰符匹配的指定属性。
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
包含要获取的属性名的字符串。
- binder
- Binder
一个对象,该对象定义一组属性并启用绑定,而绑定可能涉及选择重载成员、强制自变量类型和通过反射调用成员。
或
要使用 Nothing
的空引用(在 Visual Basic 中为 DefaultBinder)。
- returnType
- Type
属性的返回类型。
- types
- Type[]
一个 Type 对象数组,表示要获取的索引属性的参数的数目、顺序和类型。
或
获取未被索引的属性的 Type 类型的空数组(即 Type[] types = new Type[0])。
- modifiers
- ParameterModifier[]
ParameterModifier 对象的数组,表示与 types
数组中的相应元素关联的特性。 默认的联编程序不处理此参数。
返回
表示符合指定需求的属性的对象(如果找到的话);否则为 null
。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈