CSharp examples for System.Xml:XML Serialization
De Serialize Entity from XML
using System.Xml.Serialization; using System.Xml.Linq; public class Main{ public static TEntity DeSerializeEntity<TEntity>(string serialisedEntity) {/*www.j a v a 2 s. c o m*/ var document = XDocument.Parse(serialisedEntity); var serializer = new XmlSerializer(typeof(TEntity)); var result = (TEntity)serializer.Deserialize(document.CreateReader()); return result; } }