Define remotable objects in .NET Remoting.- Remotable objects are the objects that can be marshaled across the application domains.
There are two main kinds of remotable objects:
1. Marshal by value
2. Marshal by reference
1. Marshal by value:
- Where a copy of the object is created and then passed to the receiver.
- These objects declare their serialization rules.
- The remoting system makes a copy of these objects and passes the copy to the calling application domain.
2. Marshal by reference:
- Where just a reference to an existing object is passed.
- These objects are remotable objects which extend at least System.MarshalByRefObject.
- The .NET remoting infrastructure creates a proxy object in the caller's application domain that represents the MBR object, and returns to the caller a reference to that proxy.