_Type.GetProperty メソッド

定義

COM オブジェクトに、GetProperty メソッドへのバージョンに依存しないアクセスが用意されています。

オーバーロード

GetProperty(String, Type, Type[], ParameterModifier[])

COM オブジェクトに、GetProperty(String, Type, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセスが用意されています。

GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

COM オブジェクトに、GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセスが用意されています。

GetProperty(String, Type, Type[])

COM オブジェクトに、GetProperty(String, Type, Type[]) メソッドへのバージョンに依存しないアクセスが用意されています。

GetProperty(String, Type)

COM オブジェクトに、GetProperty(String, Type) メソッドへのバージョンに依存しないアクセスが用意されています。

GetProperty(String, Type[])

COM オブジェクトに、GetProperty(String, Type[]) メソッドへのバージョンに依存しないアクセスが用意されています。

GetProperty(String, BindingFlags)

COM オブジェクトに、GetProperty(String, BindingFlags) メソッドへのバージョンに依存しないアクセスが用意されています。

GetProperty(String)

COM オブジェクトに、GetProperty(String) メソッドへのバージョンに依存しないアクセスが用意されています。

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは Type.GetProperty 、現在 Typeの の特定のプロパティを取得します。

GetProperty(String, Type, Type[], ParameterModifier[])

COM オブジェクトに、GetProperty(String, Type, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセスが用意されています。

public:
 System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, Type ^ returnType, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
public System.Reflection.PropertyInfo GetProperty (string name, Type returnType, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetProperty : string * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, returnType As Type, types As Type(), modifiers As ParameterModifier()) As PropertyInfo

パラメーター

name
String

取得するパブリック プロパティの名前を格納している String

returnType
Type

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

types
Type[]

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

または

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

modifiers
ParameterModifier[]

types 配列内の対応する要素に関連付けられている属性を表す ParameterModifier オブジェクトの配列。 既定のバインダーでは、このパラメーターは処理されません。

戻り値

指定した要件と一致するパブリック プロパティが存在する場合は、そのパブリック プロパティを表す PropertyInfo オブジェクト。それ以外の場合は null

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは Type.GetProperty 、指定した引数の型と修飾子に一致するパラメーターを持つ、指定されたパブリック プロパティを検索します。

適用対象

GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

COM オブジェクトに、GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセスが用意されています。

public:
 System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, Type ^ returnType, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
public System.Reflection.PropertyInfo GetProperty (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, Type returnType, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetProperty : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, bindingAttr As BindingFlags, binder As Binder, returnType As Type, types As Type(), modifiers As ParameterModifier()) As PropertyInfo

パラメーター

name
String

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

bindingAttr
BindingFlags

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

- または -

null を返す場合は 0。

binder
Binder

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

- または -

DefaultBinder を使用する場合は null

returnType
Type

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

types
Type[]

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

または

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

modifiers
ParameterModifier[]

types 配列内の対応する要素に関連付けられている属性を表す ParameterModifier オブジェクトの配列。 既定のバインダーでは、このパラメーターは処理されません。

戻り値

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

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは Type.GetProperty 、指定したバインド制約を使用して、指定した引数の型と修飾子と一致するパラメーターを持つ、指定したプロパティを検索します。

適用対象

GetProperty(String, Type, Type[])

COM オブジェクトに、GetProperty(String, Type, Type[]) メソッドへのバージョンに依存しないアクセスが用意されています。

public:
 System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, Type ^ returnType, cli::array <Type ^> ^ types);
public System.Reflection.PropertyInfo GetProperty (string name, Type returnType, Type[] types);
abstract member GetProperty : string * Type * Type[] -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, returnType As Type, types As Type()) As PropertyInfo

パラメーター

name
String

取得するパブリック プロパティの名前を格納している String

returnType
Type

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

types
Type[]

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

または

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

戻り値

指定した引数型と一致するパラメーターが設定されているパブリック プロパティが存在する場合は、そのパブリック プロパティを表す PropertyInfo オブジェクト。それ以外の場合は null

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは Type.GetProperty 、指定した引数の型に一致するパラメーターを持つ、指定されたパブリック プロパティを検索します。

適用対象

GetProperty(String, Type)

COM オブジェクトに、GetProperty(String, Type) メソッドへのバージョンに依存しないアクセスが用意されています。

public:
 System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, Type ^ returnType);
public System.Reflection.PropertyInfo GetProperty (string name, Type returnType);
abstract member GetProperty : string * Type -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, returnType As Type) As PropertyInfo

パラメーター

name
String

取得するパブリック プロパティの名前を格納している String

returnType
Type

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

戻り値

指定した名前のパブリック プロパティが存在する場合は、そのパブリック プロパティを表す PropertyInfo オブジェクト。それ以外の場合は null

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは Type.GetProperty 、指定した名前と戻り値の型を持つパブリック プロパティを検索します。

適用対象

GetProperty(String, Type[])

COM オブジェクトに、GetProperty(String, Type[]) メソッドへのバージョンに依存しないアクセスが用意されています。

public:
 System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, cli::array <Type ^> ^ types);
public System.Reflection.PropertyInfo GetProperty (string name, Type[] types);
abstract member GetProperty : string * Type[] -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, types As Type()) As PropertyInfo

パラメーター

name
String

取得するパブリック プロパティの名前を格納している String

types
Type[]

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

または

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

戻り値

指定した引数型と一致するパラメーターが設定されているパブリック プロパティが存在する場合は、そのパブリック プロパティを表す PropertyInfo オブジェクト。それ以外の場合は null

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは Type.GetProperty 、指定した引数の型に一致するパラメーターを持つ、指定されたパブリック プロパティを検索します。

適用対象

GetProperty(String, BindingFlags)

COM オブジェクトに、GetProperty(String, BindingFlags) メソッドへのバージョンに依存しないアクセスが用意されています。

public:
 System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public System.Reflection.PropertyInfo GetProperty (string name, System.Reflection.BindingFlags bindingAttr);
abstract member GetProperty : string * System.Reflection.BindingFlags -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, bindingAttr As BindingFlags) As PropertyInfo

パラメーター

name
String

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

bindingAttr
BindingFlags

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

- または -

null を返す場合は 0。

戻り値

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

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは Type.GetProperty 、指定したバインド制約を使用して、指定したプロパティを検索します。

適用対象

GetProperty(String)

COM オブジェクトに、GetProperty(String) メソッドへのバージョンに依存しないアクセスが用意されています。

public:
 System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name);
public System.Reflection.PropertyInfo GetProperty (string name);
abstract member GetProperty : string -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String) As PropertyInfo

パラメーター

name
String

取得するパブリック プロパティの名前を格納している String

戻り値

指定した名前のパブリック プロパティが存在する場合は、そのパブリック プロパティを表す PropertyInfo オブジェクト。それ以外の場合は null

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは Type.GetProperty 、指定した名前のパブリック プロパティを検索します。

適用対象