次の方法で共有


PropertyBuilder.GetValue メソッド (Object, Object )

プロパティの取得側メソッドを呼び出して、インデックス付きプロパティの値を取得します。

Overrides Overloads Public Function GetValue( _
   ByVal obj As Object, _   ByVal index() As Object _) As Object
[C#]
public override object GetValue(objectobj,object[] index);
[C++]
public: Object* GetValue(Object* obj,Object* index __gc[]);
[JScript]
public override function GetValue(
   obj : Object,index : Object[]) : Object;

パラメータ

  • obj
    プロパティ値が返されるオブジェクト。
  • index
    インデックス付きプロパティのインデックス値 (省略可能)。インデックス付きでないプロパティの場合は、この値を null 参照 (Visual Basic では Nothing) にする必要があります。

戻り値

指定したインデックス付きプロパティの値。

例外

例外の種類 条件
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 オーバーロードの一覧