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

返回

IRegisteredObject

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

例外

typenull

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

适用于

另请参阅