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
Post a Comment