The advantage of serializing with .NET Framework functions is that serialization algorithms are capable of automatically creating so-called deep clones (complete copies) of an object.
Before we proceed, here’s a bit of background. Suppose that you have an object that saves some application data. This object has a property that provides an ArrayList that contains further elements. To create a complete copy of this object, it wouldn’t be sufficient to copy the elements contained in the ArrayList, as the following example shows:
Open the corresponding solution file (.sln), which you can find in the \VB 2010 Developer Handbook\Chapter 20\DeepCloning folder.
Module mdlMain Sub Main() Dim locAddrOriginal ...