BuildManager.GetType Method (String, Boolean, Boolean)
.NET Framework (current version)
Finds a type in the top-level assemblies, or in assemblies that are defined in configuration, by using a case-insensitive search and optionally throwing an exception on failure.
Assembly: System.Web (in System.Web.dll)
Public Shared Function GetType ( typeName As String, throwOnError As Boolean, ignoreCase As Boolean ) As Type
Parameters
- typeName
-
Type:
System.String
The name of the type.
- throwOnError
-
Type:
System.Boolean
true to throw an exception if a Type cannot be generated for the type name; otherwise, false.
- ignoreCase
-
Type:
System.Boolean
true if typeName is case-sensitive; otherwise, false.
| Exception | Condition |
|---|---|
| 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.
.NET Framework
Available since 2.0
Available since 2.0
Show: