Thursday, March 25, 2010

Serialization in .NET

Ref: http://aspalliance.com/983_Introducing_Serialization_in_NET.all

Def: Serialization is a process of converting an object into a stream of data so that it can be is easily transmittable over the network or can be continued in a persistent storage location. (or)
Serialization is the process of saving the state of an object in a persistent storage media by converting the object to a linear stream of bytes.

Serialization in .NET is provided by the System.Runtime.Serialization namespace.

The Serializable Attribute


In order for a class to be serializable, it must have the attribute SerializableAttribute set and all its members must also be serializable, except if they are ignored with the attribute NonSerializedAttribute. However, the private and public members of a class are always serialized by default. The SerializationAttribute is only used for the binary serialization.

Types of Serialization

·
Binary Serialization

· SOAP Serialization

· XML Serialization

· Custom Serialization




No comments:

Post a Comment