BuildManager.GetType Method (String, Boolean)

Finds a type in the top-level assemblies or in assemblies that are defined in configuration, and optionally throws an exception on failure.

Namespace: System.Web.Compilation
Assembly: System.Web (in system.web.dll)

public:
static Type^ GetType (
	String^ typeName, 
	bool throwOnError
)
public static Type GetType (
	String typeName, 
	boolean throwOnError
)
public static function GetType (
	typeName : String, 
	throwOnError : boolean
) : Type
Not applicable.

Parameters

typeName

The name of the type.

throwOnError

true to throw an exception if a Type object cannot be generated for the type name; otherwise, false.

Return Value

A Type object that represents the requested typeName parameter.

Exception typeCondition

HttpException

typeName is invalid.

- or -

typeName is ambiguous.

- or -

typeName could not be found, and throwOnError is true.

A top-level assembly refers to the Global.asax file, or to a file that is in the App_GlobalResources, App_WebReferences, App_Code, or App_Browsers directory.

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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: