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