c# - Windows 8.1 Store app Open Xml file in storageFolder -


i creating notes modern ui app in c# , store user's note in xml file. problem can't open xml file.

storagefolder storagefolder = windows.storage.applicationdata.current.localfolder;         storagefile file = await storagefolder.getfileasync("mynotes.xml");         if (file != null)         {             xmldocument myfile;             myfile = await xmldocument.loadfromfileasync(file); //it crashes here !          } 

after running above code app crashes , visual studio opens app.g.i.cs file , shows me global::system.diagnostics.debugger.break(); file exists here code use create it

storagefolder storagefolder = windows.storage.applicationdata.current.localfolder;             storagefile file = await storagefolder.createfileasync("mynotes.xml"); 

thank in advance.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -