Serialization:

Is the process of converting an object into a stream.

De-Serialization:

Converting a stream back into object.

XML Serialization:

Converting an object into xml stream .

XML De-Serialization:

Converting xml stream into an object.

Example for Performing xml serialization and De-Serialization

In SerializationEx.aspx

MRN:<asp:TextBox ID="tbMRN" runat="server"></asp:TextBox><br />
    Name:<asp:TextBox ID="tbName" runat="server"></asp:TextBox><br />
    DOB:<asp:TextBox ID="tbDOB" runat="server"></asp:TextBox><br />
    <asp:Button ID="btnRedirectToDesrialize" runat="server" Text="RedirectToDesrialize" 
            onclick="btnRedirectToDesrialize_Click" />

In SerializationEx.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml.Serialization;
using System.IO;

public partial class SerializationEx : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnRedirectToDesrialize_Click(object sender, EventArgs e)
    {
        Patient oPatient = new Patient();
        oPatient.Mrn = Int32.Parse(tbMRN.Text);
        oPatient.Name = tbName.Text;
        oPatient.Dob = tbDOB.Text;
        XmlSerializer ser = new XmlSerializer(typeof(Patient));
        using (TextWriter textWriter = new StreamWriter(Server.MapPath("serializedpatient.xml")))
        {
            ser.Serialize(textWriter, oPatient);
            textWriter.Close();
        }
        Response.Redirect("DeserializeEx.aspx");
    }
}

In DeSerializeEx.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Xml.Serialization;

public partial class DeSerializeEx : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        TextReader tr = new StreamReader(Server.MapPath("serializedpatient.xml"));
        XmlSerializer serializer = new XmlSerializer(typeof(Patient));
        Patient p = (Patient)serializer.Deserialize(tr);
        Response.Write("MRN:" + p.Mrn);
        Response.Write("NAME:" + p.Name);
        Response.Write("DOB:" + p.Dob);
    }
}

In Patient.cs file

Note: If you are using asp.net website type application place the Patient.cs file in App_Code folder.
[Serializable]
public class Patient
{
    private int _mrn;
    private string _dob;
    private string _name;

    public int Mrn
    {
        get { return _mrn; }
        set { _mrn = value; }
    }
    public string Name
    {
        get { return _name; }
        set { _name = value; }
    }
    public string Dob
    {
        get { return _dob; }
        set { _dob = value; }
    }
}