TypeBuilder.DefinePropertyCore 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在衍生類別中覆寫時,使用指定的名稱、呼叫慣例、屬性簽章和自定義修飾詞,將新的屬性新增至型別。
protected:
abstract System::Reflection::Emit::PropertyBuilder ^ DefinePropertyCore(System::String ^ name, System::Reflection::PropertyAttributes attributes, System::Reflection::CallingConventions callingConvention, Type ^ returnType, cli::array <Type ^> ^ returnTypeRequiredCustomModifiers, cli::array <Type ^> ^ returnTypeOptionalCustomModifiers, cli::array <Type ^> ^ parameterTypes, cli::array <cli::array <Type ^> ^> ^ parameterTypeRequiredCustomModifiers, cli::array <cli::array <Type ^> ^> ^ parameterTypeOptionalCustomModifiers);
protected abstract System.Reflection.Emit.PropertyBuilder DefinePropertyCore (string name, System.Reflection.PropertyAttributes attributes, System.Reflection.CallingConventions callingConvention, Type returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers);
abstract member DefinePropertyCore : string * System.Reflection.PropertyAttributes * System.Reflection.CallingConventions * Type * Type[] * Type[] * Type[] * Type[][] * Type[][] -> System.Reflection.Emit.PropertyBuilder
Protected MustOverride Function DefinePropertyCore (name As String, attributes As PropertyAttributes, callingConvention As CallingConventions, returnType As Type, returnTypeRequiredCustomModifiers As Type(), returnTypeOptionalCustomModifiers As Type(), parameterTypes As Type(), parameterTypeRequiredCustomModifiers As Type()(), parameterTypeOptionalCustomModifiers As Type()()) As PropertyBuilder
參數
- name
- String
屬性的名稱。 name
不能包含內嵌的 null。
- attributes
- PropertyAttributes
列舉值的位元組合,指定屬性的屬性。
- callingConvention
- CallingConventions
屬性存取子的呼叫慣例。
- returnType
- Type
屬性的傳回類型。
- returnTypeRequiredCustomModifiers
- Type[]
型別數位,表示必要的自定義修飾詞
- returnTypeOptionalCustomModifiers
- Type[]
型別數位,表示選擇性自定義修飾詞
- parameterTypes
- Type[]
方法參數的類型。
- parameterTypeRequiredCustomModifiers
- Type[][]
類型陣列的陣列。 每個類型的陣列都代表對應參數的必要自定義修飾詞。
- parameterTypeOptionalCustomModifiers
- Type[][]
類型陣列的陣列。 每一個型別陣列都表示對應參數的選擇性自訂修飾詞。
傳回
定義的屬性。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應