Creating a custom serialization class

Sometimes it is not enough to mark a whole class as serializable, quite often a class will have .net internal type that is not serializable, for example XmlDocument. In such case we need a wrapper class that is derived from ISerializable interface.

.NET Object Serialization

Have you ever wanted to send an object across application domains, save the object as a file or send it over the Internet to completely different service - then object serialization is for you. Serialization offers a way to describe object’s state(data) in a way that is understandable by other components. For example, object can be transformed into a XML or a Soap document, will get into output formats latter on.