This documentation is archived and is not being maintained.

TypeBuilder.SetParent Method

Sets the parent of this Type.

[Visual Basic]
Public Sub SetParent( _
   ByVal parent As Type _
)
[C#]
public void SetParent(
 Type parent
);
[C++]
public: void SetParent(
 Type* parent
);
[JScript]
public function SetParent(
   parent : Type
);

Parameters

parent
The parent type.

Exceptions

Exception Type Condition
ArgumentNullException parent is a null reference (Nothing in Visual Basic).
InvalidOperationException if the type was previously created using CreateType.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

TypeBuilder Class | TypeBuilder Members | System.Reflection.Emit Namespace

Show: