このプロパティの set アクセサを返します。
Overrides Overloads Public Function GetSetMethod( _
ByVal nonOverloads Public As Boolean _) As MethodInfo
[C#]
public override MethodInfo GetSetMethod(boolnonPublic);
[C++]
public: MethodInfo* GetSetMethod(boolnonPublic);
[JScript]
public override function GetSetMethod(
nonPublic : Boolean) : MethodInfo;
パラメータ
- nonPublic
非パブリック アクセサを返すかどうかを示します。非パブリック メソッドを含める場合は true 。それ以外の場合は false 。
戻り値
値 | 説明 |
---|---|
このプロパティの set メソッドを表す MethodInfo オブジェクト。 | set アクセサがパブリック。
nonPublic が true で、非パブリック メソッドを返すことができる。 |
null | nonPublic が true で、プロパティが読み取り専用。
nonPublic が false で、set アクセサが非パブリック。 |
解説
プロパティの設定関数を取得するには、Type.GetType または Assembly.GetType を使用してプロパティの親の型にリフレクションし、型から Reflection プロパティ オブジェクトを取得し、PropertyInfo.GetSetMethod を呼び出します。
必要条件
プラットフォーム: 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.GetSetMethod オーバーロードの一覧