Bagikan melalui


TypeBuilder.DefineFieldCore Metode

Definisi

Saat ditimpa di kelas turunan, menambahkan bidang baru ke jenis , dengan nama, atribut, jenis bidang, dan pengubah kustom yang diberikan.

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

Parameter

fieldName
String

Nama bidang. fieldName tidak boleh berisi null yang disematkan.

type
Type

Jenis bidang .

requiredCustomModifiers
Type[]

Array jenis yang mewakili pengubah kustom yang diperlukan untuk bidang .

optionalCustomModifiers
Type[]

Array jenis yang mewakili pengubah kustom opsional untuk bidang .

attributes
FieldAttributes

Kombinasi bitwise dari nilai enumerasi yang menentukan atribut bidang.

Mengembalikan

Bidang yang ditentukan.

Berlaku untuk