TypeBuilder.GetPropertyImpl 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在衍生類別中覆寫時,使用指定的繫結條件約束搜尋指定的屬性,而該屬性的參數符合指定的引數類型和修飾詞的建構函式。
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
字串,包含要取得的屬性名稱。
- binder
- Binder
定義一組屬性並啟用繫結的物件,可包含多載成員的選擇、引數類型的強制,以及透過反映的成員引動過程。
-或-
Null 參考 (在 Visual Basic 中為Nothing
),可使用 DefaultBinder。
- returnType
- Type
屬性的傳回類型。
- types
- Type[]
Type 物件的陣列,代表所要取得之索引屬性的參數數目、順序和類型。
-或-
用以取得未編製索引的屬性之 Type 類型的空陣列 (也就是,Type[] types = new Type[0])。
- modifiers
- ParameterModifier[]
ParameterModifier 物件的陣列,代表在 types
陣列中與對應項目關聯的屬性。 預設的繫結器不會處理這個參數。
傳回
代表符合指定之需求屬性的物件 (如有找到);否則為 null
。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應