Good day. I have a collection of some objects.
When I run the application, I need to load data from the file into the collection.
Deserialization is our everything, but I have a problem with an asynchronous file request.
How can I upload a file in this style?
History = LoadFile ("History.xml");
static async void LoadObject(StorageFile Path) { using (var readerStream = await Path.OpenStreamForReadAsync()) { var Serializer = new XmlSerializer(typeof(?????); try { ????? = (??????)Serializer.Deserialize(readerStream); } catch (Exception e) { ShowMessage(string.Format("Exception: {0}\n{1}", e.InnerException, e.Message)); } } }
Approximately in this way I have an organized loading method.