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!

TypeBuilder.DefineNestedType (String, TypeAttributes, Type, PackingSize)

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

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

Parameters

name
The full path name of the type.
attr
The attributes of the type.
parent
The type that the nested type extends.
packSize
The packing size of the type.

Return Value

The defined nested type.

Exceptions

Exception Type Condition
ArgumentException if the nested attribute is not specified, or if this type is sealed, or if this type is an array, or if this type is an interface but the nested type is not an interface
ArgumentNullException if name is a null reference (in Visual Basic Nothing) or a null interface is specified in the interfaces array
InvalidOperationException if the type was previously created using CreateType

See Also

TypeBuilder Class | TypeBuilder Members | System.Reflection.Emit Namespace | TypeBuilder.DefineNestedType Overload List