Serialization





0/5 (0 vote)
The process of serialization converts an object into a form so that it can be transported across the network or can be placed in a storage location.
The process of serialization converts an object into a form so that it can be transported across the network or can be placed in a storage location. The storage location could be a physical file, database or ASP.NET Cache. The state of the Object is preserved in form so that it could be constructed again at some later stage, which is know as Deserialization.
There are three formats of serialization
- Binary Serialization - Light and compact used in Remoting
- SOAP Serialization - interoperable use SOAP and used in web Services
- XML Serialization - Custom Serialization
In this article I will put forward an example of XML Serialization.
XML Serialization
For XML serialization, For every public member you need an attribute and that is necessary. it can serialize only public members.
It is also known as Shallow Serialization.
Following Is the code for serializing while accessing the data from Database.