using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; using System.Xml.Serialization; using System.Xml; using System.IO; namespace xmlDeserWin { class Parser { public IEnumerable Deser() { List users; using (var reader = new StreamReader("fileXML.xml")) { if (reader == null) return null; XmlSerializer deserializer = new XmlSerializer(typeof(List), new XmlRootAttribute("user_list")); users = (List)deserializer.Deserialize(reader); return users; } } } }