Top C# Interview Questions

What is Managed Code & Unmanaged Code? What is Boxing & Unboxing?Difference between Value type & Reference type?…

How to serialize an object to XML string?

You can use below method to serialize your object to XML string.Namespaces required:using System.Xml.Serialization;using System.IO;Method definition:public string GetXMLString<T>(T objectToSerialize) …