Soap Serialization

Soap serialization works similarly to binary serialization. First, you need to add a reference to the System.Runtime.Serialization.Formatters.Soap.dll assembly. Then you add an Imports System.Runtime.Serialization.Formatters.Soap directive. At this point you can serialize and deserialize your objects. To continue the example of the typed collection shown in the previous section, write the following code to accomplish serialization with the Soap formatter:

image

Basically there is no difference in the syntax for the Soap formatter if compared to the binary one.

Tip on Generic Collections

The SoapFormatter class does not allow serializing ...

Get Visual Basic® 2010 Unleashed 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.