I’m developing a system the other night for a client and was working with a very critical part of the system. I’m using Microsoft Visual C# and while I was coding, my son suddenly turn off my computer. I thought there will be no issue after that but when I open the project again, I saw that the form I’m working can’t be opened in the form designer. And so I open it using an editor and saw the following sets of nulls inside the file as shown below.
I was panicking already that time since I am working on it in double since I’m already passed my deadline. My last back-up was a few weeks back and I can’t afford working on it again from scratch. What I did is search for “recover corrupted C# file” or “recover error C# form” from the leading search engines but I didn’t find any specific solution for this. I even run chkdsk /f to my disk to see if can fix the corrupted file but it didn’t.
However, I found a post about using a recovery tool like Recuva or R-Studio recovery tool to restore the said file. I made a back-up of the corrupted file then cross my finger hoping I can recover it. Well I did recovered it using the tools.
I just scan the folder the tool where my code resides and recover the specific file I need. I found out that Windows is mirroring my previous edits and store it somewhere else and recovery tool like Recuva can recover it.
The following is a snapshot of Recuva as shown in their official website.
How about you guys, do you any other method in recovering null code cause by power outage or sudden Windows restart? Share it please using the comment form below. TIA.