Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public List<Person> LoadXml()
Person[] loadAry;
System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(Person[]));
using (System.IO.StreamReader sr = new System.IO.StreamReader("Data.xml", new System.Text.UTF8Encoding(false)))
loadAry = (Person[])serializer.Deserialize(sr);
return loadAry.ToList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment