ClientBuildManager::CreateObject Method (Type^, Boolean)

 

Creates an object in the application domain of the ASP.NET runtime.

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

public:
IRegisteredObject^ CreateObject(
	Type^ type,
	bool failIfExists
)

Parameters

type
Type: System::Type^

The type of object to be created.

failIfExists
Type: System::Boolean

true to throw an exception if the object has already been created in the application domain of the ASP.NET runtime; otherwise, false.

Return Value

Type: System.Web.Hosting::IRegisteredObject^

An object in the application domain of the ASP.NET runtime.

Exception Condition
ArgumentNullException

type is null.

InvalidOperationException

The object already exists in the application domain and failIfExists is true.

.NET Framework
Available since 2.0
Return to top
Show: