public static void LoadNpcs(string rootPath) { try { using (var fs = new FileStream(Path.Combine(rootPath, @".\npcs\client_npcs.xml"), FileMode.Open, FileAccess.Read)) using (var reader = XmlReader.Create(fs)) { XmlSerializer ser = new XmlSerializer(typeof(NpcFile)); npcData = (NpcFile)ser.Deserialize(reader); } } catch (Exception ex) { Debug.Print(ex.ToString()); } }