Activator.GetObject Activator.GetObject Activator.GetObject Method

Definition

Creates a proxy for a well-known object or XML Web service.

Overloads

GetObject(Type, String) GetObject(Type, String) GetObject(Type, String)

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

GetObject(Type, String, Object) GetObject(Type, String, Object) GetObject(Type, String, Object)

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

GetObject(Type, String) GetObject(Type, String) GetObject(Type, String)

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

public:
 static System::Object ^ GetObject(Type ^ type, System::String ^ url);
[System.Security.SecurityCritical]
public static object GetObject (Type type, string url);
static member GetObject : Type * string -> obj

Parameters

type
Type Type Type

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

url
String String String

The URL of the well-known object.

Returns

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

Exceptions

type is not marshaled by reference and is not an interface.

This member was invoked with a late-binding mechanism.

Remarks

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.

Security

SecurityCriticalAttribute
Requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

See also

GetObject(Type, String, Object) GetObject(Type, String, Object) GetObject(Type, String, Object)

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

public:
 static System::Object ^ GetObject(Type ^ type, System::String ^ url, System::Object ^ state);
[System.Security.SecurityCritical]
public static object GetObject (Type type, string url, object state);
static member GetObject : Type * string * obj -> obj

Parameters

type
Type Type Type

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

url
String String String

The URL of the well-known object.

state
Object Object Object

Channel-specific data or null.

Returns

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

Exceptions

type is not marshaled by reference and is not an interface.

This member was invoked with a late-binding mechanism.

Remarks

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.

The state parameter communicates information to the channel, and is passed to the IChannelSender.CreateMessageSink method.

Security

SecurityCriticalAttribute
Requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

See also

Applies to