NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ModuleBuilder.DefineType (String, TypeAttributes, Type, PackingSize, Int32)

Constructs a TypeBuilder given the type name, attributes, the type that the defined type extends, the packing size of the defined type, and the total size of the defined type.

[Visual Basic]
Overloads Public Function DefineType( _
   ByVal name As String, _
   ByVal attr As TypeAttributes, _
   ByVal parent As Type, _
   ByVal packingSize As PackingSize, _
   ByVal typesize As Integer _
) As TypeBuilder
[C#]
public TypeBuilder DefineType(
   string name,
   TypeAttributes attr,
   Type parent,
   PackingSize packingSize,
   int typesize
);
[C++]
public: TypeBuilder* DefineType(
   String* name,
   TypeAttributes attr,
   Type* parent,
   PackingSize packingSize,
   int typesize
);
[JScript]
public function DefineType(
   name : String,
   attr : TypeAttributes,
   parent : Type,
   packingSize : PackingSize,
   typesize : int
) : TypeBuilder;

Parameters

name
The full path name of the type.
attr
The attributes of the defined type.
parent
[To be supplied.]
packingSize
The packing size of the type.
typesize
The total size of the type.

Return Value

Returns a TypeBuilder created with all of the requested attributes.

Exceptions

Exception Type Condition
ArgumentException if name is null.

Requirements

NGWS Runtime Security:

ReflectionPermission SecurityAction.Demand, ReflectionEmit

See Also

ModuleBuilder Class | ModuleBuilder Members | System.Reflection.Emit Namespace | ModuleBuilder.DefineType Overload List