次の方法で共有


PropertyBuilder.GetGetMethod メソッド (Boolean)

このプロパティのパブリックおよび非パブリックな get アクセサを返します。

Overrides Overloads Public Function GetGetMethod( _
   ByVal nonOverloads Public As Boolean _) As MethodInfo
[C#]
public override MethodInfo GetGetMethod(boolnonPublic);
[C++]
public: MethodInfo* GetGetMethod(boolnonPublic);
[JScript]
public override function GetGetMethod(
   nonPublic : Boolean) : MethodInfo;

パラメータ

  • nonPublic
    非パブリックな get アクセサを返すかどうかを示します。非パブリック メソッドを含める場合は true 。それ以外の場合は false

戻り値

nonPublictrue の場合は、このプロパティの get アクセサを表す MethodInfo オブジェクト。 nonPublicfalse で get アクセサが非パブリックの場合、または nonPublictrue でも get アクセサがない場合は、 null 参照 (Visual Basic では Nothing) を返します。

解説

プロパティの取得関数を取得するには、Type.GetType または Assembly.GetType を使用してプロパティの親の型にリフレクションし、型から Reflection プロパティ オブジェクトを取得し、PropertyInfo.GetGetMethod を呼び出します。

必要条件

プラットフォーム: 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.GetGetMethod オーバーロードの一覧