This documentation is archived and is not being maintained.

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

Parameters

type

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

url

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

ArgumentNullException

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

RemotingException

type is not marshaled by reference or an interface.

MemberAccessException

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.

  • ReflectionPermission  for the ability to invoke operations on all type members. Associated enumeration: ReflectionPermissionFlag/MemberAccess
  • SecurityPermission  for the ability to configure Remoting types and channels. Associated enumeration: SecurityPermissionFlag/RemotingConfiguration

Windows 98, Windows 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Show: