c# - What to do if App crashes or is closed while writing a file? -



c# - What to do if App crashes or is closed while writing a file? -

so i've found it's possible app crash or closed while in process of writing file. if happens (especially if it's big file) tends overwrite file existed before , leave new file 0 bytes in it.

so, do in case? should writing files temporary files first, using rename phone call overwrite old file? should including waiting function in unhandledexception event?

unhandledexception event not help you.. no code can 100% guaranteed run. not unhandledexception event.. first approach have on mind mutual one.. i.e. utilize temp file.

c# windows-runtime windows-phone windows-store-apps

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -