Constructs a TypeBuilder given the type name, attributes, the type that the defined type extends, and the interfaces that the defined type implements.
[Visual Basic] Overloads Public Function DefineType( _ ByVal name As String, _ ByVal attr As TypeAttributes, _ ByVal parent As Type, _ ByVal interfaces() As Type _ ) As TypeBuilder [C#] public TypeBuilder DefineType( string name, TypeAttributes attr, Type parent, Type[] interfaces ); [C++] public: TypeBuilder* DefineType( String* name, TypeAttributes attr, Type* parent, Type* interfaces[] ); [JScript] public function DefineType( name : String, attr : TypeAttributes, parent : Type, interfaces : Type[] ) : TypeBuilder;
Returns a TypeBuilder created with all of the requested attributes.
Exception Type | Condition |
---|---|
ArgumentException | if name is null. |
NGWS Runtime Security:
ReflectionPermission | SecurityAction.Demand, ReflectionEmit |
ModuleBuilder Class | ModuleBuilder Members | System.Reflection.Emit Namespace | ModuleBuilder.DefineType Overload List