PropertyBuilder.GetGetMethod(Boolean) メソッド

定義

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

public:
 override System::Reflection::MethodInfo ^ GetGetMethod(bool nonPublic);
public override System.Reflection.MethodInfo GetGetMethod(bool nonPublic);
override this.GetGetMethod : bool -> System.Reflection.MethodInfo
Public Overrides Function GetGetMethod (nonPublic As Boolean) As MethodInfo

パラメーター

nonPublic
Boolean

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

返品

nonPublictrue場合、このプロパティの get アクセサーを表すMethodInfo オブジェクト。 nonPublicfalseされ、get アクセサーがパブリックでない場合、またはnonPublictrueされていても get アクセサーが存在しない場合は、nullを返します。

注釈

プロパティの getter を取得するには、Type.GetType または Assembly.GetType を使用してプロパティの親型を反映し、その型から Reflection プロパティ オブジェクトを取得し、PropertyInfo.GetGetMethod を呼び出します。

適用対象