CSharp examples for System.Xml:XML Serialization
Deserialize Object from XML String
using System.IO;/*ww w. j a v a 2 s .c o m*/ using System.Xml.Serialization; public class Main{ public static T DeserializeObject<T>(string toDeserialize) { var xmlSerializer = new XmlSerializer(typeof(T)); var result = xmlSerializer.Deserialize(new StringReader(toDeserialize)); return (T)result; } }