This documentation is archived and is not being maintained.

ToolboxItem::GetType Method (IDesignerHost, AssemblyName, String, Boolean)

Creates an instance of the specified type, optionally using a specified designer host and assembly name.

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

protected:
virtual Type^ GetType(
	IDesignerHost^ host, 
	AssemblyName^ assemblyName, 
	String^ typeName, 
	bool reference
)

Parameters

host
Type: System.ComponentModel.Design::IDesignerHost

The IDesignerHost for the current document. This can be nullptr.

assemblyName
Type: System.Reflection::AssemblyName

An AssemblyName that indicates the assembly that contains the type to load. This can be nullptr.

typeName
Type: System::String

The name of the type to create an instance of.

reference
Type: System::Boolean

A value indicating whether or not to add a reference to the assembly that contains the specified type to the designer host's set of references.

Return Value

Type: System::Type
An instance of the specified type, if it can be located.

ExceptionCondition
ArgumentNullException

typeName is not specified.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Show: