Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
XMLから読み込む処理
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
You can’t perform that action at this time.