次の方法で共有


EnumBuilder.GetPropertyImpl メソッド

指定したバインディング制約を使用して、指定した引数の型および修飾子と一致するパラメータが設定された指定のプロパティを検索します。

Overrides Protected Function GetPropertyImpl( _
   ByVal name As String, _   ByVal bindingAttr As BindingFlags, _   ByVal binder As Binder, _   ByVal returnType As Type, _   ByVal types() As Type, _   ByVal modifiers() As ParameterModifier _) As PropertyInfo
[C#]
protected override PropertyInfo GetPropertyImpl(stringname,BindingFlagsbindingAttr,Binderbinder,TypereturnType,Type[] types,ParameterModifier[] modifiers);
[C++]
protected: PropertyInfo* GetPropertyImpl(String* name,BindingFlagsbindingAttr,Binder* binder,Type* returnType,Type* types[],ParameterModifiermodifiers[]);
[JScript]
protected override function GetPropertyImpl(
   name : String,bindingAttr : BindingFlags,binder : Binder,returnType : Type,types : Type[],modifiers : ParameterModifier[]) : PropertyInfo;

パラメータ

  • name
    取得するプロパティの名前を格納している String

  • bindingAttr
    検索の実行方法を指定する 1 つ以上の BindingFlags から成るビット マスク。

    または

    パブリック プロパティに対して大文字と小文字を区別して検索を行う場合は 0。

  • binder
    一連のプロパティを定義し、バインディングを有効にする Binder オブジェクト。バインディングには、オーバーロードされたメンバの選択、引数の型の強制変換、リフレクションによるメンバの呼び出しなどが含まれます。

    または

    DefaultBinder を使用する場合は null 参照 (Visual Basic では Nothing) 。

  • returnType
    プロパティの戻り値の型。

  • types
    取得するインデックス付きプロパティに対するパラメータの数値、順序、および型を表す Type オブジェクトの配列。

    または

    インデックス付けされていないプロパティを取得するための、 Type 型の空の配列 (つまり、Type[] types = new Type[0])。

  • modifiers
    types 配列内の対応する要素に関連付けられている属性を表す ParameterModifier オブジェクトの配列。

戻り値

指定した要件と一致するプロパティが存在する場合は、そのプロパティを表す PropertyInfo オブジェクト。それ以外の場合は null 参照 (Visual Basic では Nothing) 。

例外

例外の種類 条件
NotSupportedException このメソッドは現在、不完全な型に対してはサポートされていません。

解説

終了型のプロパティを取得する代替手段としては、 Type.GetType または Assembly.GetType を使用して型を取得し、取得した型に対してリフレクションを使用します。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

EnumBuilder クラス | EnumBuilder メンバ | System.Reflection.Emit 名前空間