ClientBuildManager.CreateObject(Type, Boolean) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在 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 运行时的应用程序域中的对象。
例外
type 是 null。
对象已存在于应用程序域中,并且 failIfExists 为 true.