ApplicationManager.GetObject Method (String, Type)

 

Returns the registered object of the specified type from the specified application.

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

<SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted := True)>
Public Function GetObject (
	appId As String,
	type As Type
) As IRegisteredObject

Parameters

appId
Type: System.String

The unique identifier for the application that owns the object.

type
Type: System.Type

The type of the object to return.

Return Value

Type: System.Web.Hosting.IRegisteredObject

The registered object of the specified type; or null if the type has not been registered through a call to the CreateObject method.

Exception Condition
ArgumentNullException

appId is null.

—or—

type is null.

.NET Framework
Available since 2.0
Return to top
Show: