ApplicationManager.GetObject Method (String, Type)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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 IRegisteredObject GetObject(
	string appId,
	Type type
)

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: