TypeBuilder.DefineFieldCore Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, adds a new field to the type, with the given name, attributes, field type, and custom modifiers.
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
Parameters
- fieldName
- String
The name of the field. fieldName
cannot contain embedded nulls.
- type
- Type
The type of the field.
- requiredCustomModifiers
- Type[]
An array of types representing the required custom modifiers for the field.
- optionalCustomModifiers
- Type[]
An array of types representing the optional custom modifiers for the field.
- attributes
- FieldAttributes
A bitwise combination of the enumeration values that specifies the attributes of the field.
Returns
The defined field.