With VB 6 and ADO 2.x I can't tell you how many times I wrote the following type of code and only realized what I had done after I had pressed F5:
Usually the moment after I ran this code I would realize that I was in an infinite loop. Then I would quickly put in the oRs.MoveNext just before the end of the loop and all would be well. Fortunately, in ADO.NET I no longer have this problem thanks to the DataReader and how it reads a record and moves the cursor to the next position all in one fell swoop. So .NET saved me from one of my most infamous blunders.
But of course I didn't get off that easy. I now have all new mistakes to make with .NET. My most common mistake these days occurs when I declare a variable inside of a "try" block and then use it outside of the "try" block. For example, I'll do something along the lines of the foo method below:
But at least with this mistake I catch it when I build my C# project. Then I move the declaration of the variable x outside of the try block and all is well.
OK, so now that I have opened up and shared some of my embarassing blunders, it's time for you to share some of your common blunders. Don't be shy!