CSharp examples for System.Xml:XML Serialization
XML Deserialize from TextReader
using System.Xml.Serialization; using System.Xml; using System.Text; using System.IO;//ww w .j ava2 s . c om using System.Collections.Generic; using System.Collections; using System; public class Main{ public static T Deserialize<T>(TextReader reader) { XmlSerializer s = new XmlSerializer( typeof( T ) ); return (T)s.Deserialize( reader ); } }