DesignSurface.CreateInstance Method (Type)

 

Creates an instance of the given type.

Namespace:   System.ComponentModel.Design
Assembly:  System.Design (in System.Design.dll)

protected internal virtual object CreateInstance(
	Type type
)

Parameters

type
Type: System.Type

The type to create.

Return Value

Type: System.Object

The newly created object.

Exception Condition
ArgumentNullException

type is null.

ObjectDisposedException

The IDesignerHost attached to the DesignSurface has been disposed.

If type is an IComponent, CreateInstance searches for a constructor of type IContainer first, followed by an empty constructor.

.NET Framework
Available since 2.0
Return to top
Show: