System.Reflection.Emit.TypeBuilder Members

The members of System.Reflection.Emit.TypeBuilder are listed below.

See Also: Inherited members from System.Reflection.TypeInfo

Public Fields

const
UnspecifiedTypeSizeint (0).

Represents that total size for the type is not specified.

Public Properties

[read-only]
override
AssemblySystem.Reflection.Assembly.

Retrieves the dynamic assembly that contains this type definition.

[read-only]
override
AssemblyQualifiedNamestring.

Returns the full name of this type qualified by the display name of the assembly.

[read-only]
override
BaseTypeType.

Retrieves the base type of this type.

[read-only]
override
ContainsGenericParametersbool. Documentation for this section has not yet been entered.
[read-only]
override
DeclaringMethodSystem.Reflection.MethodBase.

Gets the method that declared the current generic type parameter.

[read-only]
override
DeclaringTypeType.

Returns the type that declared this type.

[read-only]
override
FullNamestring.

Retrieves the full path of this type.

[read-only]
override
GenericParameterAttributesSystem.Reflection.GenericParameterAttributes.

Gets a value that indicates the covariance and special constraints of the current generic type parameter.

[read-only]
override
GenericParameterPositionint.

Gets the position of a type parameter in the type parameter list of the generic type that declared the parameter.

[read-only]
override
GUIDGuid.

Retrieves the GUID of this type.

[read-only]
override
IsConstructedGenericTypebool.

Gets a value that indicates whether this object represents a constructed generic type.

[read-only]
override
IsGenericParameterbool.

Gets a value indicating whether the current type is a generic type parameter.

[read-only]
override
IsGenericTypebool.

Gets a value indicating whether the current type is a generic type.

[read-only]
override
IsGenericTypeDefinitionbool.

Gets a value indicating whether the current System.Reflection.Emit.TypeBuilder represents a generic type definition from which other generic types can be constructed.

[read-only]
override
ModuleSystem.Reflection.Module.

Retrieves the dynamic module that contains this type definition.

[read-only]
override
Namestring.

Retrieves the name of this type.

[read-only]
override
Namespacestring.

Retrieves the namespace where this TypeBuilder is defined.

[read-only]
PackingSizePackingSize.

Retrieves the packing size of this type.

[read-only]
override
ReflectedTypeType.

Returns the type that was used to obtain this type.

[read-only]
Sizeint.

Retrieves the total size of a type.

[read-only]
override
TypeHandleRuntimeTypeHandle.

Not supported in dynamic modules.

[read-only]
TypeTokenTypeToken.

Returns the type token of this type.

[read-only]
override
UnderlyingSystemTypeType.

Returns the underlying system type for this TypeBuilder.

Public Methods

AddDeclarativeSecurity(System.Security.Permissions.SecurityAction, System.Security.PermissionSet)

Adds declarative security to this type.

AddInterfaceImplementation(Type)

Adds an interface that this type implements.

CreateType() : Type

Creates a Type object for the class. After defining fields and methods on the class, CreateType is called in order to load its Type object.

DefineConstructor(System.Reflection.MethodAttributes, System.Reflection.CallingConventions, Type[]) : ConstructorBuilder

Adds a new constructor to the type, with the given attributes and signature.

DefineConstructor(System.Reflection.MethodAttributes, System.Reflection.CallingConventions, Type[], Type[][], Type[][]) : ConstructorBuilder

Adds a new constructor to the type, with the given attributes, signature, and custom modifiers.

DefineDefaultConstructor(System.Reflection.MethodAttributes) : ConstructorBuilder

Defines the default constructor. The constructor defined here will simply call the default constructor of the parent.

DefineEvent(string, System.Reflection.EventAttributes, Type) : EventBuilder

Adds a new event to the type, with the given name, attributes and event type.

DefineField(string, Type, System.Reflection.FieldAttributes) : FieldBuilder

Adds a new field to the type, with the given name, attributes, and field type.

DefineField(string, Type, Type[], Type[], System.Reflection.FieldAttributes) : FieldBuilder

Adds a new field to the type, with the given name, attributes, field type, and custom modifiers.

DefineGenericParameters(params string[]) : GenericTypeParameterBuilder[]

Defines the generic type parameters for the current type, specifying their number and their names, and returns an array of System.Reflection.Emit.GenericTypeParameterBuilder objects that can be used to set their constraints.

DefineInitializedData(string, byte[], System.Reflection.FieldAttributes) : FieldBuilder

Defines initialized data field in the .sdata section of the portable executable (PE) file.

DefineMethod(string, System.Reflection.MethodAttributes) : MethodBuilder

Adds a new method to the type, with the specified name and method attributes.

DefineMethod(string, System.Reflection.MethodAttributes, System.Reflection.CallingConventions) : MethodBuilder

Adds a new method to the type, with the specified name, method attributes, and calling convention.

DefineMethod(string, System.Reflection.MethodAttributes, Type, Type[]) : MethodBuilder

Adds a new method to the type, with the specified name, method attributes, and method signature.

DefineMethod(string, System.Reflection.MethodAttributes, System.Reflection.CallingConventions, Type, Type[]) : MethodBuilder

Adds a new method to the type, with the specified name, method attributes, calling convention, and method signature.

DefineMethod(string, System.Reflection.MethodAttributes, System.Reflection.CallingConventions, Type, Type[], Type[], Type[], Type[][], Type[][]) : MethodBuilder

Adds a new method to the type, with the specified name, method attributes, calling convention, method signature, and custom modifiers.

DefineMethodOverride(System.Reflection.MethodInfo, System.Reflection.MethodInfo)

Specifies a given method body that implements a given method declaration, potentially with a different name.

DefineNestedType(string) : TypeBuilder

Defines a nested type, given its name.

DefineNestedType(string, System.Reflection.TypeAttributes) : TypeBuilder

Defines a nested type, given its name and attributes.

DefineNestedType(string, System.Reflection.TypeAttributes, Type) : TypeBuilder

Defines a nested type, given its name, attributes, and the type that it extends.

DefineNestedType(string, System.Reflection.TypeAttributes, Type, int) : TypeBuilder

Defines a nested type, given its name, attributes, the total size of the type, and the type that it extends.

DefineNestedType(string, System.Reflection.TypeAttributes, Type, PackingSize) : TypeBuilder

Defines a nested type, given its name, attributes, the type that it extends, and the packing size.

DefineNestedType(string, System.Reflection.TypeAttributes, Type, Type[]) : TypeBuilder

Defines a nested type, given its name, attributes, the type that it extends, and the interfaces that it implements.

DefinePInvokeMethod(string, string, string, System.Reflection.MethodAttributes, System.Reflection.CallingConventions, Type, Type[], Type[], Type[], Type[][], Type[][], System.Runtime.InteropServices.CallingConvention, System.Runtime.InteropServices.CharSet) : MethodBuilder

Defines a PInvoke method given its name, the name of the DLL in which the method is defined, the name of the entry point, the attributes of the method, the calling convention of the method, the return type of the method, the types of the parameters of the method, the PInvoke flags, and custom modifiers for the parameters and return type.

DefinePInvokeMethod(string, string, System.Reflection.MethodAttributes, System.Reflection.CallingConventions, Type, Type[], System.Runtime.InteropServices.CallingConvention, System.Runtime.InteropServices.CharSet) : MethodBuilder

Defines a PInvoke method given its name, the name of the DLL in which the method is defined, the attributes of the method, the calling convention of the method, the return type of the method, the types of the parameters of the method, and the PInvoke flags.

DefinePInvokeMethod(string, string, string, System.Reflection.MethodAttributes, System.Reflection.CallingConventions, Type, Type[], System.Runtime.InteropServices.CallingConvention, System.Runtime.InteropServices.CharSet) : MethodBuilder

Defines a PInvoke method given its name, the name of the DLL in which the method is defined, the name of the entry point, the attributes of the method, the calling convention of the method, the return type of the method, the types of the parameters of the method, and the PInvoke flags.

DefineProperty(string, System.Reflection.PropertyAttributes, Type, Type[]) : PropertyBuilder

Adds a new property to the type, with the given name and property signature.

DefineProperty(string, System.Reflection.PropertyAttributes, System.Reflection.CallingConventions, Type, Type[]) : PropertyBuilder

Adds a new property to the type, with the given name, attributes, calling convention, and property signature.

DefineProperty(string, System.Reflection.PropertyAttributes, Type, Type[], Type[], Type[], Type[][], Type[][]) : PropertyBuilder

Adds a new property to the type, with the given name, property signature, and custom modifiers.

DefineProperty(string, System.Reflection.PropertyAttributes, System.Reflection.CallingConventions, Type, Type[], Type[], Type[], Type[][], Type[][]) : PropertyBuilder

Adds a new property to the type, with the given name, calling convention, property signature, and custom modifiers.

DefineTypeInitializer() : ConstructorBuilder

Defines the initializer for this type.

DefineUninitializedData(string, int, System.Reflection.FieldAttributes) : FieldBuilder

Defines an uninitialized data field in the .sdata section of the portable executable (PE) file.

static
GetConstructor(Type, System.Reflection.ConstructorInfo) : System.Reflection.ConstructorInfo

Returns the constructor of the specified constructed generic type that corresponds to the specified constructor of the generic type definition.

override
GetConstructors(System.Reflection.BindingFlags) : System.Reflection.ConstructorInfo[]

Returns an array of System.Reflection.ConstructorInfo objects representing the public and non-public constructors defined for this class, as specified.

override
GetCustomAttributes(bool) : object[]

Returns all the custom attributes defined for this type.

override
GetCustomAttributes(Type, bool) : object[]

Returns all the custom attributes of the current type that are assignable to a specified type.

override
GetElementType() : Type

Calling this method always throws NotSupportedException.

override
GetEvent(string, System.Reflection.BindingFlags) : System.Reflection.EventInfo

Returns the event with the specified name.

override
GetEvents() : System.Reflection.EventInfo[]

Returns the public events declared or inherited by this type.

override
GetEvents(System.Reflection.BindingFlags) : System.Reflection.EventInfo[]

Returns the public and non-public events that are declared by this type.

override
GetField(string, System.Reflection.BindingFlags) : System.Reflection.FieldInfo

Returns the field specified by the given name.

static
GetField(Type, System.Reflection.FieldInfo) : System.Reflection.FieldInfo

Returns the field of the specified constructed generic type that corresponds to the specified field of the generic type definition.

override
GetFields(System.Reflection.BindingFlags) : System.Reflection.FieldInfo[]

Returns the public and non-public fields that are declared by this type.

override
GetGenericArguments() : Type[]

Returns an array of Type objects representing the type arguments of a generic type or the type parameters of a generic type definition.

override
GetGenericTypeDefinition() : Type

Returns a Type object that represents a generic type definition from which the current type can be obtained.

override
GetInterface(string, bool) : Type

Returns the interface implemented (directly or indirectly) by this class with the fully qualified name matching the given interface name.

override
GetInterfaceMap(Type) : System.Reflection.InterfaceMapping

Returns an interface mapping for the requested interface.

override
GetInterfaces() : Type[]

Returns an array of all the interfaces implemented on this type and its base types.

override
GetMember(string, System.Reflection.MemberTypes, System.Reflection.BindingFlags) : System.Reflection.MemberInfo[]

Returns all the public and non-public members declared or inherited by this type, as specified.

override
GetMembers(System.Reflection.BindingFlags) : System.Reflection.MemberInfo[]

Returns the members for the public and non-public members declared or inherited by this type.

static
GetMethod(Type, System.Reflection.MethodInfo) : System.Reflection.MethodInfo

Returns the method of the specified constructed generic type that corresponds to the specified method of the generic type definition.

override
GetMethods(System.Reflection.BindingFlags) : System.Reflection.MethodInfo[]

Returns all the public and non-public methods declared or inherited by this type, as specified.

override
GetNestedType(string, System.Reflection.BindingFlags) : Type

Returns the public and non-public nested types that are declared by this type.

override
GetNestedTypes(System.Reflection.BindingFlags) : Type[]

Returns the public and non-public nested types that are declared or inherited by this type.

override
GetProperties(System.Reflection.BindingFlags) : System.Reflection.PropertyInfo[]

Returns all the public and non-public properties declared or inherited by this type, as specified.

override
InvokeMember(string, System.Reflection.BindingFlags, System.Reflection.Binder, object, object[], System.Reflection.ParameterModifier[], System.Globalization.CultureInfo, string[]) : object

Invokes the specified member. The method that is to be invoked must be accessible and provide the most specific match with the specified argument list, under the constraints of the specified binder and invocation attributes.

override
IsAssignableFrom(System.Reflection.TypeInfo) : bool

Gets a value that indicates whether a specified System.Reflection.TypeInfo object can be assigned to this object.

override
IsAssignableFrom(Type) : bool

Gets a value that indicates whether a specified Type can be assigned to this object.

IsCreated() : bool

Returns a value that indicates whether the current dynamic type has been created.

override
IsDefined(Type, bool) : bool

Determines whether a custom attribute is applied to the current type.

override
IsSubclassOf(Type) : bool

Determines whether this type is derived from a specified type.

override
MakeArrayType() : Type

Returns a Type object that represents a one-dimensional array of the current type, with a lower bound of zero.

override
MakeArrayType(int) : Type

Returns a Type object that represents an array of the current type, with the specified number of dimensions.

override
MakeByRefType() : Type

Returns a Type object that represents the current type when passed as a ref parameter (ByRef in Visual Basic).

override
MakeGenericType(params Type[]) : Type

Substitutes the elements of an array of types for the type parameters of the current generic type definition, and returns the resulting constructed type.

override
MakePointerType() : Type

Returns a Type object that represents the type of an unmanaged pointer to the current type.

SetCustomAttribute(CustomAttributeBuilder)

Set a custom attribute using a custom attribute builder.

SetCustomAttribute(System.Reflection.ConstructorInfo, byte[])

Sets a custom attribute using a specified custom attribute blob.

SetParent(Type)

Sets the base type of the type currently under construction.

override
ToString() : string

Returns the name of the type excluding the namespace.

Protected Methods

override
GetAttributeFlagsImpl() : System.Reflection.TypeAttributes
Documentation for this section has not yet been entered.
override
GetConstructorImpl(System.Reflection.BindingFlags, System.Reflection.Binder, System.Reflection.CallingConventions, Type[], System.Reflection.ParameterModifier[]) : System.Reflection.ConstructorInfo
Documentation for this section has not yet been entered.
override
GetMethodImpl(string, System.Reflection.BindingFlags, System.Reflection.Binder, System.Reflection.CallingConventions, Type[], System.Reflection.ParameterModifier[]) : System.Reflection.MethodInfo
Documentation for this section has not yet been entered.
override
GetPropertyImpl(string, System.Reflection.BindingFlags, System.Reflection.Binder, Type, Type[], System.Reflection.ParameterModifier[]) : System.Reflection.PropertyInfo
Documentation for this section has not yet been entered.
override
HasElementTypeImpl() : bool
Documentation for this section has not yet been entered.
override
IsArrayImpl() : bool
Documentation for this section has not yet been entered.
override
IsByRefImpl() : bool
Documentation for this section has not yet been entered.
override
IsCOMObjectImpl() : bool
Documentation for this section has not yet been entered.
override
IsPointerImpl() : bool
Documentation for this section has not yet been entered.
override
IsPrimitiveImpl() : bool
Documentation for this section has not yet been entered.
override
IsValueTypeImpl() : bool
Documentation for this section has not yet been entered.

Explicitly Implemented Interface Members

System.Runtime.InteropServices._TypeBuilder.GetIDsOfNamesDocumentation for this section has not yet been entered.
System.Runtime.InteropServices._TypeBuilder.GetTypeInfo

Retrieves the type information for an object, which can then be used to get the type information for an interface.

System.Runtime.InteropServices._TypeBuilder.GetTypeInfoCountDocumentation for this section has not yet been entered.
System.Runtime.InteropServices._TypeBuilder.InvokeDocumentation for this section has not yet been entered.