ApplicationManager.GetObject(String, Type) 方法

定義

從指定應用程式傳回指定型別的註冊物件。

public:
 System::Web::Hosting::IRegisteredObject ^ GetObject(System::String ^ appId, Type ^ type);
public System.Web.Hosting.IRegisteredObject GetObject (string appId, Type type);
member this.GetObject : string * Type -> System.Web.Hosting.IRegisteredObject
Public Function GetObject (appId As String, type As Type) As IRegisteredObject

參數

appId
String

應用程式的唯一識別項,該應用程式擁有物件。

type
Type

要傳回的物件型別。

傳回

指定型別的註冊物件,否則,如果未透過呼叫 CreateObject(String, Type, String, String, Boolean) 方法註冊型別,則為 null

例外狀況

appIdnull

-或-

typenull

適用於