Binder.SelectProperty 方法

基于指定的判据,从给定的属性集中选择一个属性。

**命名空间:**System.Reflection
**程序集:**mscorlib(在 mscorlib.dll 中)

语法

声明
Public MustOverride Function SelectProperty ( _
    bindingAttr As BindingFlags, _
    match As PropertyInfo(), _
    returnType As Type, _
    indexes As Type(), _
    modifiers As ParameterModifier() _
) As PropertyInfo
用法
Dim instance As Binder
Dim bindingAttr As BindingFlags
Dim match As PropertyInfo()
Dim returnType As Type
Dim indexes As Type()
Dim modifiers As ParameterModifier()
Dim returnValue As PropertyInfo

returnValue = instance.SelectProperty(bindingAttr, match, returnType, indexes, modifiers)
public abstract PropertyInfo SelectProperty (
    BindingFlags bindingAttr,
    PropertyInfo[] match,
    Type returnType,
    Type[] indexes,
    ParameterModifier[] modifiers
)
public:
virtual PropertyInfo^ SelectProperty (
    BindingFlags bindingAttr, 
    array<PropertyInfo^>^ match, 
    Type^ returnType, 
    array<Type^>^ indexes, 
    array<ParameterModifier>^ modifiers
) abstract
public abstract PropertyInfo SelectProperty (
    BindingFlags bindingAttr, 
    PropertyInfo[] match, 
    Type returnType, 
    Type[] indexes, 
    ParameterModifier[] modifiers
)
public abstract function SelectProperty (
    bindingAttr : BindingFlags, 
    match : PropertyInfo[], 
    returnType : Type, 
    indexes : Type[], 
    modifiers : ParameterModifier[]
) : PropertyInfo

参数

  • match
    已被 Reflection 确定为可能的匹配项的属性集,通常是因为它们有正确的成员名称。
  • returnType
    匹配属性必须具有的返回值。
  • indexes
    所搜索的属性的索引类型。用于索引属性,如类的索引器。
  • modifiers
    使绑定能够处理在其中修改了类型的参数签名的参数修饰符数组。

返回值

包含匹配属性的 PropertyInfo 对象。

备注

此方法控制 Type 上的 GetProperty 方法提供的选项。

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

.NET Compact Framework

受以下版本支持:2.0、1.0

请参见

参考

Binder 类
Binder 成员
System.Reflection 命名空间
PropertyInfo