This morning I was doing a project in Visual Studio 2005.
I worked on it for four hours. I've got VS to save my work
everytime I recompile, so I don't worry to much about the power
failing or whatever.
At about mid-day i had a bright spark idea of replacing all ""
in my code with string.Empty
No real reason just one of those sort of OO type moods.
So I did a find and replace on the entire project.
The only problem being that I replaced ("")
with string.Empty, when I should have replaced it with
(string.Empty)
Anyhow that in itself shouldn't have been to major a problem.
Apart from the fact I then had the genius idea of hitting the
global undo button which should have undone the find and replace.
Big mistake. It would seem there is a bug in VS 2005,
and when you do stuff in the order I just did it doesn't just undo
the last action..
Oh no it undoes all actions since opening the editor.
So effectively all my work for the morning had been undone.
At this point if I had realised it had done this I could have tried
the global redo, or just closed VS and not save the files...
Unfortunatley I didn't. I recompiled the code, thus saving the changes,
and so undoing four hours of work.
One day I'm going to learn. Never trust a clever feature in VS
until you've tried it lots and lots and lots of times, on stuff that really
doesn't matter!