In XMLSerialization, we convert the data into the format of an XML document, which can then be transferred easily across the network.
During deserialization, we can render an object from the same XML document format. XMLSerializer is based upon Simple Object Access Protocol (SOAP), a protocol for exchanging information with web services.
While working with XmLSerlializer, we must mark our classes with the Serializable tag to inform the compiler that this class is serializable. Please refer to the following code implementation wherein we are using this tag against our class to inform the compiler that the class is Serializable:
[Serializable]public class Student{ public string FirstName { get; set; } public string LastName { ...