Feeling Sensitive About Case in C#
I have no idea why variable names in C# were made case-sensitive. As a VB guy trying to get into C#, it seems stupid that anyone would want one variable called strMyVar and another called strmyVar. The really annoying part is that when I want to re-assign a value to a declared variable, I have to look for the declaration version, copy it, and paste it where I need it so I get the case correct. In VB, I usually remember the variable name but not the case, so I can just type strmyvar and let the VS.NET editor fix up the case.
Anyway, this rant does have a purpose: to request a two-part Visual Studio feature or add-in. First, it would have a mode that would forbid declaration of an identical variable name in that scope no matter what the case. Second, once a variable is declared, the tool would fix up any form of it - just like the way VB does.
The sniggering, pseudo-macho types who believe that "real developers thrive on case-sensitivity" wouldn't have to use the wimp-case option. They could still feel very superior - while taking longer to get their work done.
Oh, and don't get me started on why the C# editor waits for me to recompile before it discovers that I've already fixed stuff it was complaining about.
Ken
MVP [ASP.NET]