// Generally this shouldn't be used outside of the static constructor /// <summary> /// </summary> /// <param name="fileName"> /// </param> /// <returns> /// </returns> public static Playfields LoadXml(string fileName) { XmlSerializer serializer = new XmlSerializer(typeof(Playfields)); TextReader reader = new StreamReader(fileName); Playfields data = (Playfields)serializer.Deserialize(reader); reader.Close(); return(data); }
/// <summary> /// </summary> static Playfields() { Instance = LoadXml(Path.Combine("XML Data", "Playfields.xml")); }