TypeBuilder.GetPropertyImpl 方法

定義

在衍生類別中覆寫時,使用指定的繫結條件約束搜尋指定的屬性,而該屬性的參數符合指定的引數類型和修飾詞的建構函式。

protected:
 override System::Reflection::PropertyInfo ^ GetPropertyImpl(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, Type ^ returnType, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
protected override System.Reflection.PropertyInfo GetPropertyImpl (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, Type? returnType, Type[]? types, System.Reflection.ParameterModifier[]? modifiers);
protected override System.Reflection.PropertyInfo GetPropertyImpl (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, Type returnType, Type[] types, System.Reflection.ParameterModifier[] modifiers);
override this.GetPropertyImpl : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
Protected Overrides Function GetPropertyImpl (name As String, bindingAttr As BindingFlags, binder As Binder, returnType As Type, types As Type(), modifiers As ParameterModifier()) As PropertyInfo

參數

name
String

字串,包含要取得的屬性名稱。

bindingAttr
BindingFlags

列舉值的位元組合,用來指定搜尋的執行方式。

-或-

要傳回 nullDefault

binder
Binder

定義一組屬性並啟用繫結的物件,可包含多載成員的選擇、引數類型的強制,以及透過反映的成員引動過程。

-或-

Null 參考 (在 Visual Basic 中為Nothing ),可使用 DefaultBinder

returnType
Type

屬性的傳回類型。

types
Type[]

Type 物件的陣列,代表所要取得之索引屬性的參數數目、順序和類型。

-或-

用以取得未編製索引的屬性之 Type 類型的空陣列 (也就是,Type[] types = new Type[0])。

modifiers
ParameterModifier[]

ParameterModifier 物件的陣列,代表在 types 陣列中與對應項目關聯的屬性。 預設的繫結器不會處理這個參數。

傳回

代表符合指定之需求屬性的物件 (如有找到);否則為 null

適用於