ClientBuildManager.CreateObject(Type, Boolean) 方法

定义

在 ASP.NET 运行时的应用程序域中创建对象。

public:
 System::Web::Hosting::IRegisteredObject ^ CreateObject(Type ^ type, bool failIfExists);
public System.Web.Hosting.IRegisteredObject CreateObject(Type type, bool failIfExists);
member this.CreateObject : Type * bool -> System.Web.Hosting.IRegisteredObject
Public Function CreateObject (type As Type, failIfExists As Boolean) As IRegisteredObject

参数

type
Type

要创建的对象的类型。

failIfExists
Boolean

如果对象已在 ASP.NET 运行时的应用程序域中创建,则true引发异常;否则为 false

返回

ASP.NET 运行时的应用程序域中的对象。

例外

typenull

对象已存在于应用程序域中,并且 failIfExiststrue.

适用于

另请参阅