CSharp examples for System.Xml:XML Serialization
Xml Deserialize
using System.Xml.Serialization; using System.Xml; using System.Text; using System.Linq; using System.IO;/*from w w w . j a v a 2 s . com*/ using System.Collections.Generic; using System; public class Main{ public static T XmlDeserialize<T>(this Stream stream) { var serializer = new System.Xml.Serialization.XmlSerializer(typeof(T)); T theObject = (T)serializer.Deserialize(stream); return theObject; } }