IReflect.GetProperty メソッド

定義

指定したプロパティに対応する PropertyInfo オブジェクトを取得します。

オーバーロード

GetProperty(String, BindingFlags)

指定した検索制約の下で、指定したプロパティに対応する PropertyInfo オブジェクトを取得します。

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

指定した検索制約で、指定したプロパティに対応する PropertyInfo オブジェクトを取得します。

GetProperty(String, BindingFlags)

指定した検索制約の下で、指定したプロパティに対応する PropertyInfo オブジェクトを取得します。

public:
 System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public System.Reflection.PropertyInfo? GetProperty (string name, System.Reflection.BindingFlags bindingAttr);
public System.Reflection.PropertyInfo GetProperty (string name, System.Reflection.BindingFlags bindingAttr);
abstract member GetProperty : string * System.Reflection.BindingFlags -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, bindingAttr As BindingFlags) As PropertyInfo

パラメーター

name
String

検索するプロパティの名前。

bindingAttr
BindingFlags

検索を制御するために使用されるバインディング属性。

戻り値

PropertyInfo

bindingAttr で指定された検索制約に一致する見つかったプロパティの PropertyInfo オブジェクト。プロパティが見つからなかった場合は null

例外

オブジェクトに複数のフィールドが同じ名前で実装されています。

こちらもご覧ください

適用対象

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

指定した検索制約で、指定したプロパティに対応する PropertyInfo オブジェクトを取得します。

public:
 System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, Type ^ returnType, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
public System.Reflection.PropertyInfo? GetProperty (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, Type? returnType, Type[] types, System.Reflection.ParameterModifier[]? modifiers);
public System.Reflection.PropertyInfo GetProperty (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, Type returnType, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetProperty : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, bindingAttr As BindingFlags, binder As Binder, returnType As Type, types As Type(), modifiers As ParameterModifier()) As PropertyInfo

パラメーター

name
String

検索対象のメンバーの名前。

bindingAttr
BindingFlags

検索の制御に使用されるバインディング属性。

binder
Binder

このメソッドに関連するプロパティが含まれ、Binder を実装するオブジェクト。

returnType
Type

プロパティの型。

types
Type[]

同じ名前のオーバーロードされたメソッドからの選択に使用する配列。

modifiers
ParameterModifier[]

パラメーター修飾子の選択に使用する配列。

戻り値

PropertyInfo

指定した名前のプロパティがこのリフレクション オブジェクトで見つかった場合は、見つかったプロパティの PropertyInfo オブジェクト。プロパティが見つからなかった場合は null

注釈

このメソッドは、 PropertyInfo 指定した検索制約の下で、指定したプロパティに対応するオブジェクトを取得します。 型配列は、オーバーロードされたメソッドの中から選択するために使用されます。

こちらもご覧ください

適用対象