MarshalByRefObject.CreateObjRef Method (Type)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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 Overridable Function CreateObjRef (
	requestedType As Type
) As ObjRef


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