XmlSerializer

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 { ...

Get Programming in C#: Exam 70-483 (MCSD) Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.