CreateObjRef Method

MarshalByRefObject.CreateObjRef Method (Type)


Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

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

public virtual ObjRef CreateObjRef(
	Type requestedType


Type: System.Type

The Type of the object that the new ObjRef will reference.

Return Value

Type: System.Runtime.Remoting.ObjRef

Information required to generate a proxy.

Exception Condition

This instance is not a valid remoting object.


The immediate caller does not have infrastructure permission.

TheCreateObjRef method is called by remote object creation methods such as AppDomain.CreateInstance and AppDomain.CreateInstanceAndUnwrap. In most cases, there is no need to override this method.


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

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft