This documentation is archived and is not being maintained.

TypeBuilder Members

TypeBuilder overview

Public Fields

public fieldstatic (Shared in Visual Basic)UnspecifiedTypeSize Represents that total size for the type is not specified.

Public Properties

public propertyAssembly Overridden. Retrieves the dynamic assembly that contains this type definition.
public propertyAssemblyQualifiedName Overridden. Returns the full name of this type qualified by the display name of the assembly.
public propertyAttributes (inherited from Type) Gets the attributes associated with the Type.
public propertyBaseType Overridden. Retrieves the base type of this type.
public propertyDeclaringType Overridden. Returns the type that declared this type.
public propertyFullName Overridden. Retrieves the full path of this type.
public propertyGUID Overridden. Retrieves the GUID of this type.
public propertyHasElementType (inherited from Type) Gets a value indicating whether the current Type encompasses or refers to another type; that is, whether the current Type is an array, a pointer, or is passed by reference.
public propertyIsAbstract (inherited from Type) Gets a value indicating whether the Type is abstract and must be overridden.
public propertyIsAnsiClass (inherited from Type) Gets a value indicating whether the string format attribute AnsiClass is selected for the Type.
public propertyIsArray (inherited from Type) Gets a value indicating whether the Type is an array.
public propertyIsAutoClass (inherited from Type) Gets a value indicating whether the string format attribute AutoClass is selected for the Type.
public propertyIsAutoLayout (inherited from Type) Gets a value indicating whether the class layout attribute AutoLayout is selected for the Type.
public propertyIsByRef (inherited from Type) Gets a value indicating whether the Type is passed by reference.
public propertyIsClass (inherited from Type) Gets a value indicating whether the Type is a class; that is, not a value type or interface.
public propertyIsCOMObject (inherited from Type) Gets a value indicating whether the Type is a COM object.
public propertyIsContextful (inherited from Type) Gets a value indicating whether the Type can be hosted in a context.
public propertyIsEnum (inherited from Type) Gets a value indicating whether the current Type represents an enumeration.
public propertyIsExplicitLayout (inherited from Type) Gets a value indicating whether the class layout attribute ExplicitLayout is selected for the Type.
public propertyIsImport (inherited from Type) Gets a value indicating whether the Type was imported from another class.
public propertyIsInterface (inherited from Type) Gets a value indicating whether the Type is an interface; that is, not a class or a value type.
public propertyIsLayoutSequential (inherited from Type) Gets a value indicating whether the class layout attribute SequentialLayout is selected for the Type.
public propertyIsMarshalByRef (inherited from Type) Gets a value indicating whether the Type is marshaled by reference.
public propertyIsNestedAssembly (inherited from Type) Gets a value indicating whether the Type is nested and visible only within its own assembly.
public propertyIsNestedFamANDAssem (inherited from Type) Gets a value indicating whether the Type is nested and visible only to classes that belong to both its own family and its own assembly.
public propertyIsNestedFamily (inherited from Type) Gets a value indicating whether the Type is nested and visible only within its own family.
public propertyIsNestedFamORAssem (inherited from Type) Gets a value indicating whether the Type is nested and visible only to classes that belong to either its own family or to its own assembly.
public propertyIsNestedPrivate (inherited from Type) Gets a value indicating whether the Type is nested and declared private.
public propertyIsNestedPublic (inherited from Type) Gets a value indicating whether a class is nested and declared public.
public propertyIsNotPublic (inherited from Type) Gets a value indicating whether the top-level Type is not declared public.
public propertyIsPointer (inherited from Type) Gets a value indicating whether the Type is a pointer.
public propertyIsPrimitive (inherited from Type) Gets a value indicating whether the Type is one of the primitive types.
public propertyIsPublic (inherited from Type) Gets a value indicating whether the top-level Type is declared public.
public propertyIsSealed (inherited from Type) Gets a value indicating whether the Type is declared sealed.
public propertyIsSerializable (inherited from Type) Gets a value indicating whether the Type is serializable.
public propertyIsSpecialName (inherited from Type) Gets a value indicating whether the Type has a name that requires special handling.
public propertyIsUnicodeClass (inherited from Type) Gets a value indicating whether the string format attribute UnicodeClass is selected for the Type.
public propertyIsValueType (inherited from Type) Gets a value indicating whether the Type is a value type.
public propertyMemberType (inherited from Type) Overridden. Gets a bitmask indicating the member type.
public propertyModule Overridden. Retrieves the dynamic module that contains this type definition.
public propertyName Overridden. Retrieves the name of this type.
public propertyNamespace Overridden. Retrieves the namespace where this TypeBuilder is defined.
public propertyPackingSize Retrieves the packing size of this type.
public propertyReflectedType Overridden. Returns the type that was used to obtain this type.
public propertySize Retrieves the total size of a type.
public propertyTypeHandle Overridden. Not supported in dynamic modules.
public propertyTypeInitializer (inherited from Type) Gets the initializer for the Type.
public propertyTypeToken Returns the type token of this type.
public propertyUnderlyingSystemType Overridden. Returns the underlying system type for this TypeBuilder.

Public Methods

public methodAddDeclarativeSecurity Adds declarative security to this type.
public methodAddInterfaceImplementation Adds an interface that this type implements.
public methodCreateType 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.
public methodDefineConstructor Adds a new constructor to the class, with the given attributes and signature.
public methodDefineDefaultConstructor Defines the default constructor. The constructor defined here will simply call the default constructor of the parent.
public methodDefineEvent Adds a new event to the class, with the given name, attributes and event type.
public methodDefineField Adds a new field to the class, with the given name, attributes and field type.
public methodDefineInitializedData Defines initialized data field in the .sdata section of the portable executable (PE) file.
public methodDefineMethod Overloaded. Defines a method.
public methodDefineMethodOverride Specifies a given method body that implements a given method declaration.
public methodDefineNestedType Overloaded. Defines a nested type.
public methodDefinePInvokeMethod Overloaded. Defines a PInvoke method.
public methodDefineProperty Adds a new property to the class, with the given name and property signature.
public methodDefineTypeInitializer Defines the initializer for this type.
public methodDefineUninitializedData Defines uninitialized data field in the .sdata section of the portable executable (PE) file.
public methodEquals (inherited from Type) Overloaded. Overridden. Determines if the underlying system type of the current Type is the same as the underlying system type of the specified Object or Type.
public methodFindInterfaces (inherited from Type) Returns an array of Type objects representing a filtered list of interfaces implemented or inherited by the current Type.
public methodFindMembers (inherited from Type) Returns a filtered array of MemberInfo objects of the specified member type.
public methodGetArrayRank (inherited from Type) Gets the number of dimensions in an Array.
public methodGetConstructor (inherited from Type) Overloaded. Gets a specific constructor of the current Type.
public methodGetConstructors Overloaded.
public methodGetCustomAttributes Overloaded. Overridden. Returns the custom attributes defined for this type.
public methodGetDefaultMembers (inherited from Type) Searches for the members defined for the current Type whose DefaultMemberAttribute is set.
public methodGetElementType Overridden. Calling this method always throws NotSupportedException.
public methodGetEvent Overloaded.
public methodGetEvents Overloaded.
public methodGetField Overloaded.
public methodGetFields Overloaded.
public methodGetHashCode (inherited from Type) Overridden. Returns the hash code for this instance.
public methodGetInterface Overloaded.
public methodGetInterfaceMap Overridden. Returns an interface mapping for the requested interface.
public methodGetInterfaces Overridden. Returns an array of all the interfaces implemented on this a class and its base classes.
public methodGetMember Overloaded.
public methodGetMembers Overloaded.
public methodGetMethod (inherited from Type) Overloaded. Gets a specific method of the current Type.
public methodGetMethods Overloaded.
public methodGetNestedType Overloaded.
public methodGetNestedTypes Overloaded.
public methodGetProperties Overloaded.
public methodGetProperty (inherited from Type) Overloaded. Gets a specific property of the current Type.
public methodGetType (inherited from Object) Gets the Type of the current instance.
public methodInvokeMember Overloaded.
public methodIsAssignableFrom Overridden. Determines whether an instance of the current Type can be assigned from an instance of the specified Type.
public methodIsDefined Overridden. Set a custom attribute using a custom attribute builder.
public methodIsInstanceOfType (inherited from Type) Determines whether the specified object is an instance of the current Type.
public methodIsSubclassOf Overridden. Checks if this type is a derived class of the given type c.
public methodSetCustomAttribute Overloaded. Sets a custom attribute.
public methodSetParent Sets the parent of this Type.
public methodToString Overridden. Returns the name of the type excluding the namespace.

Protected Methods

protected methodFinalize (inherited from Object) Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodGetAttributeFlagsImpl Overridden. Returns the implementation attribute flags.
protected methodGetConstructorImpl Overridden. Searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.
protected methodGetMethodImpl Overridden. Searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.
protected methodGetPropertyImpl Overridden. Searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints.
protected methodHasElementTypeImpl Overridden. Calling this method always throws NotSupportedException.
protected methodIsArrayImpl Overridden. Always returns false.
protected methodIsByRefImpl Overridden. Always returns false.
protected methodIsCOMObjectImpl Overridden. Checks if this type imports a COM type.
protected methodIsContextfulImpl (inherited from Type) Implements the IsContextful property and determines whether the Type can be hosted in a context.
protected methodIsMarshalByRefImpl (inherited from Type) Implements the IsMarshalByRef property and determines whether the Type is marshalled by reference.
protected methodIsPointerImpl Overridden. Always returns false.
protected methodIsPrimitiveImpl Overridden. Always returns false.
protected methodIsValueTypeImpl (inherited from Type) Implements the IsValueType property and determines whether the Type is a value type; that is, not a class or an interface.
protected methodMemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

TypeBuilder Class | System.Reflection.Emit Namespace

Show: