Serialization

Earlier, we used an instance of MessageQueue to send a message composed of a string. We will now look at other ways to format messages using the Message class and associated formatting classes (XMLMessageFormatter, BinaryMessageFormatter, ActiveXMessageFormatter). These classes are responsible for serializing and deserializing our messages when sending and receiving from queues.

Message Body

When we discuss message formatting, we are primarily concerned with the contents, or body, of the message. When we specify a format for a message or encrypt a message, only its body is affected. The message body can consist of nearly any type of information. It can contain a simple string value, a date, a currency, an array of bytes, or even ...

Get Visual Basic® Programmer's Guide to the .NET Framework Class Library 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.