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 mainly used to save the particular state of an object in order to be able to recreate it when needed. For learning more about c# You can refer c# interview questions
Serialization: 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. There are two types of serialization methods, binary and xml There are two ways of serialization basic and custom where basic is automatic serialization where the serializabelAtrribute is only mentioned, whereas Custom serialization is where how to serialize is also can be defined which will be helpful to prevent error There is also another method of designer serialization where the serialization of the designer objects are performed Xml serialization: The main start of the serializer has XmlSerializer class which is to be initiated and the to which type it is to be serialized that main serialized component will start with [Serializable] attribute We have [XmlAttribute] to refer attribute, [XmlElement] to refer to sub element which may have a different structure of Attributes, [XmlArray] which has a main Array with a Title and the [XmlArrayItem] which implements a different structure, [XmlIgnore] to ignore certain type of attribute or element of that name, IXmlSerializable interface to manually write or read a chunk of data After serialization any type of writer can be called to write it into a file (on serialize) or database or memory( on deserialize) We have Serialize in xml.serializer object which does the serialization functionality and deserialize method doing the deserialzation functionality Ref: http://msdn.microsoft.com/en-us/library/vstudio/ms233843.aspx