MarshalByRefObject Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Enables access to objects across application domain boundaries in applications that support remoting.

Inheritance Hierarchy

System. . :: . .Object
  System..::..MarshalByRefObject
    More...

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

Syntax

'Declaration
<SerializableAttribute> _
Public MustInherit Class MarshalByRefObject
[SerializableAttribute]
public abstract class MarshalByRefObject
[SerializableAttribute]
public ref class MarshalByRefObject abstract
[<AbstractClass>]
[<SerializableAttribute>]
type MarshalByRefObject =  class end
public abstract class MarshalByRefObject

The MarshalByRefObject type exposes the following members.

Constructors

  Name Description
Protected method MarshalByRefObject Initializes a new instance of the MarshalByRefObject class.

Top

Methods

  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

An application domain is a partition in an operating system process where one or more applications reside. Objects in the same application domain communicate directly. Objects in different application domains communicate either by transporting copies of objects across application domain boundaries, or by using a proxy to exchange messages.

MarshalByRefObject is the base class for objects that communicate across application domain boundaries by exchanging messages using a proxy. Objects that do not inherit from MarshalByRefObject are implicitly marshal by value. When a remote application references a marshal by value object, a copy of the object is passed across application domain boundaries.

MarshalByRefObject objects are accessed directly within the boundaries of the local application domain. The first time an application in a remote application domain accesses a MarshalByRefObject, a proxy is passed to the remote application. Subsequent calls on the proxy are marshaled back to the object residing in the local application domain.

Types must inherit from MarshalByRefObject when the type is used across application domain boundaries, and the state of the object must not be copied because the members of the object are not usable outside the application domain where they were created.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System Namespace

Inheritance Hierarchy

System. . :: . .Object
  System..::..MarshalByRefObject
    Microsoft.SPOT. . :: . .Bitmap
    Microsoft.SPOT. . :: . .Font
    System. . :: . .AppDomain
    System.IO. . :: . .FileSystemInfo
    System.IO. . :: . .Stream
    System.IO. . :: . .TextReader
    System.IO. . :: . .TextWriter
    System.Net. . :: . .WebRequest
    System.Net. . :: . .WebResponse
    System.Threading. . :: . .Timer
    System.Threading. . :: . .WaitHandle