// get usernames from the xml file and populate the list box // when next the application is executed the follo. time public UserList deserializeFromXML() { var userList = new UserList(); XmlSerializer deserializer = new XmlSerializer(typeof(UserList)); using (StreamReader textReader = new StreamReader(@"h:\users.xml")) { userList = (UserList)deserializer.Deserialize(textReader); textReader.Close(); } return userList; }
//Constructor public StorageController() { currentUser = new User(); users = new UserList(); levelDictionary = new Dictionary<String, Level>(); }