BuildManager.GetCompiledType Method

Compiles a file, given its virtual path, and returns the compiled type.

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

public static Type GetCompiledType (
	string virtualPath
public static Type GetCompiledType (
	String virtualPath
public static function GetCompiledType (
	virtualPath : String
) : Type
Not applicable.



The virtual path to build into a type.

Return Value

A Type object that represents the type generated from compiling the virtual path.

Exception typeCondition


An error occurred when compiling the virtual path.


virtualPath is a null reference (Nothing in Visual Basic).

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