Pages

Thursday, May 23, 2013

Serialization and deserialization in C#



Serialization is the process of converting an object into a stream of bytes in order to store the object or transmit it to memory, a database, or a file.
 *Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization.
*On the other end, deserialization reconstructs the object from the stream.

Some good uses for serialization/deserialization include: 
  1. Storing user preferences in an object.
  2. Maintaining security information across pages and applications.
  3. Modification of XML documents without using the DOM.
  4. Passing an object from on application to another.
  5. Passing an object from one domain to another.
  6. Passing an object through a firewall as an XML string. 
 

No comments:

Post a Comment