Activator.GetObject Method (Type, String)

Creates a proxy for the well-known object indicated by the specified type and URL.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

public static Object GetObject (
	Type type,
	string url
public static Object GetObject (
	Type type, 
	String url
public static function GetObject (
	type : Type, 
	url : String
) : Object
Not applicable.



The type of the well-known object to which you want to connect.


The URL of the well-known object.

Return Value

A proxy that points to an endpoint served by the requested well-known object.

Exception typeCondition


type or url is a null reference (Nothing in Visual Basic).


type is not marshaled by reference.


type is an interface.


This member was invoked with a late-binding mechanism.

Call the proxy to send messages to the remote object. No messages are sent over the network until a method is called on the proxy.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions