7.10.1. Interface

The type of a remotely accessible object is a standard .NET type, with several simple restrictions. A remotely accessible object must inherit from the MarshalByRefObject base class, which marks it as an object to be passed by reference. The base class also implements a reference creation method. Only serializable types can be passed by value.

public class Example : MarshalByRefObject
{
  public void printMessage (string message)
  {
    System.Console.WriteLine (message);
  }
}

The code of the stubs is generated from the type description at runtime.