public void ReadDB() { XmlSerializer deserializer = new XmlSerializer(typeof(UsersDB)); if (File.Exists(UsersXmlPath)) { using (TextReader reader = new StreamReader(UsersXmlPath)) { UsersDB = (UsersDB) deserializer.Deserialize(reader); } } else { Debug.WriteLine("File missing"); } }
public UserDBManager() { UsersXmlPath = @"..\..\..\Resources\UsersData\UsersData.xml"; UsersDB = new UsersDB(); }