Marshaling Objects by Value

Marshal-by-value objects are not remote objects. By-value objects are marked with the SerializableAttribute or implement the ISerializable interface. When a serializable object is requested from a remote server, the object is serialized into an XML or binary format and transmitted to the requester. Only data is shipped. Thus, if the serialized object has methods that need to be invoked, the code must exist on the recipient device. This is similar to how Web Services work. A Web Service returns an XML representation of an object that is comprised of data only. If you want to invoke operations on the data, you need the assembly that contains the methods. (This approach is used to return serialized data sets from an XML ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.