Type.GetPropertyImpl メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Type.GetPropertyImpl メソッドの意味・解説 

Type.GetPropertyImpl メソッド

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

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Protected MustOverride Function
 GetPropertyImpl ( _
    name As String, _
    bindingAttr As BindingFlags, _
    binder As Binder, _
    returnType As Type, _
    types As Type(), _
    modifiers As ParameterModifier() _
) As PropertyInfo
Dim name As String
Dim bindingAttr As BindingFlags
Dim binder As Binder
Dim returnType As Type
Dim types As Type()
Dim modifiers As ParameterModifier()
Dim returnValue As PropertyInfo

returnValue = Me.GetPropertyImpl(name, bindingAttr, binder, returnType,
 types, modifiers)
protected abstract PropertyInfo GetPropertyImpl (
    string name,
    BindingFlags bindingAttr,
    Binder binder,
    Type returnType,
    Type[] types,
    ParameterModifier[] modifiers
)
protected:
virtual PropertyInfo^ GetPropertyImpl (
    String^ name, 
    BindingFlags bindingAttr, 
    Binder^ binder, 
    Type^ returnType, 
    array<Type^>^ types, 
    array<ParameterModifier>^ modifiers
) abstract
protected abstract PropertyInfo GetPropertyImpl (
    String name, 
    BindingFlags bindingAttr, 
    Binder binder, 
    Type returnType, 
    Type[] types, 
    ParameterModifier[] modifiers
)
protected abstract function GetPropertyImpl
 (
    name : String, 
    bindingAttr : BindingFlags, 
    binder : Binder, 
    returnType : Type, 
    types : Type[], 
    modifiers : ParameterModifier[]
) : PropertyInfo

パラメータ

name

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

bindingAttr

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

または

null 参照 (Visual Basic では Nothing) を返す 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)。

例外例外
例外の種類条件

AmbiguousMatchException

指定した名前を持ち、指定したバインディング制約に一致するプロパティが 2 つ以上存在します。

ArgumentNullException

name が null 参照 (Visual Basic では Nothing) です。

または

types が null 参照 (Visual Basic では Nothing) です。

または

types の 1 つの要素が null 参照 (Visual Basic では Nothing) です。

ArgumentException

types が多次元です。

または

modifiers が多次元です。

または

types と modifiers の長さが異なります。

解説解説

既定のバインダは ParameterModifier (modifiers パラメータ) を処理しませんが、System.Reflection.Binder 抽象クラスを使用してmodifiers を処理するカスタム バインダを記述できます。ParameterModifier は、COM 相互運用機能によって呼び出すときだけに使用され、参照渡しされるパラメータだけが処理されます。

types 配列と modifiers 配列の長さが同じです。types 配列で指定するパラメータには、modifiers 配列で指定されている pdIn、pdOut、pdLcid、pdRetval、pdOptional、pdHasDefault の各属性を設定できます。これらの属性は、それぞれ [In]、[Out]、[lcid]、[retval]、[optional]、およびパラメータが既定値を持つかどうかを指定する値を表します。パラメータに関連付けられた属性はメタデータに格納され、相互運用性のために使用されます。

次の BindingFlags フィルタ フラグは、検索対象に含めるプロパティを定義するために使用できます。

次の BindingFlags 修飾フラグは、検索方法を変更するために使用できます。

詳細については、「System.Reflection.BindingFlags」を参照してください。

要求された型がパブリックではなく、呼び出し元に現在のアセンブリ外の非パブリック オブジェクトをリフレクションするための ReflectionPermission がない場合、このメソッドは null 参照 (Visual Basic では Nothing) を返します。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Type クラス
Type メンバ
System 名前空間
PropertyInfo
String クラス
BindingFlags
Binder
DefaultBinder
ParameterModifier
ReflectionPermission
GetProperty
GetProperties



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

Type.GetPropertyImpl メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Type.GetPropertyImpl メソッドのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS