指定したバインディング、インデックス、および CultureInfo のプロパティの値を取得します。
Overrides Overloads Public Function GetValue( _
ByVal obj As Object, _ ByVal invokeAttr As BindingFlags, _ ByVal binder As Binder, _ ByVal index() As Object, _ ByVal culture As CultureInfo _) As Object
[C#]
public override object GetValue(objectobj,BindingFlagsinvokeAttr,Binderbinder,object[] index,CultureInfoculture);
[C++]
public: Object* GetValue(Object* obj,BindingFlagsinvokeAttr,Binder* binder,Object* index __gc[],CultureInfo* culture);
[JScript]
public override function GetValue(
obj : Object,invokeAttr : BindingFlags,binder : Binder,index : Object[],culture : CultureInfo) : Object;
パラメータ
- obj
プロパティ値が返されるオブジェクト。 - invokeAttr
呼び出し属性。 BindingFlags のビット フラグ InvokeMethod 、 CreateInstance 、 Static 、 GetField 、 SetField 、 GetProperty 、または SetProperty にする必要があります。適切な呼び出し属性を指定する必要があります。静的メンバを呼び出す場合は、 BindingFlags の Static フラグを設定する必要があります。 - binder
バインディング、引数型の強制変換、メンバの呼び出し、および、リフレクションを使用した MemberInfo オブジェクトの取得を有効にするオブジェクト。binder が null 参照 (Visual Basic では Nothing) の場合は、既定のバインダが使用されます。 - index
インデックス付きプロパティのインデックス値 (省略可能)。インデックス付きでないプロパティの場合は、この値を null 参照 (Visual Basic では Nothing) にする必要があります。 - culture
リソースのローカライズ対象のカルチャを表す CultureInfo オブジェクト。リソースがこのカルチャ用にローカライズされていない場合は、一致する対象を検索するために CultureInfo.Parent メソッドが連続して呼び出されます。この値が null 参照 (Visual Basic では Nothing) の場合は、 CultureInfo.CurrentUICulture プロパティから CultureInfo が取得されます。
戻り値
obj のプロパティ値。
例外
例外の種類 | 条件 |
---|---|
NotSupportedException | このメソッドはサポートされていません。 |
解説
プロパティの値を取得するには、Type.GetType または Assembly.GetType を使用してプロパティの親の型にリフレクションし、型から Reflection プロパティ オブジェクトを取得し、PropertyInfo.GetValue を呼び出します。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
PropertyBuilder クラス | PropertyBuilder メンバ | System.Reflection.Emit 名前空間 | PropertyBuilder.GetValue オーバーロードの一覧