Is VB Really Case Insensitive?

Posted by Otaku on Stack Overflow See other posts from Stack Overflow or by Otaku
Published on 2010-02-20T04:03:15Z Indexed on 2010/03/13 4:17 UTC
Read the original article Hit count: 315

I'm not trying to start an argument here, but for whatever reason it's typically stated that VB is case insensitive and C languages aren't (and somehow that is a good thing).

But here's my question: Where exactly is VB case insensitive? When I type...

Dim ss As String
Dim SS As String

...into the VS2008 IDE the second one has a warning of "Local variable 'SS' is already declared in the current block". In VBA VBE, it doesn't immediately kick an error, but rather just auto-corrects the case.

Am I missing something here with this argument that VB is not case sensitive? (Also, if you know or care to answer, why would that be a bad thing?)


EDIT:

  1. Why am I even asking this question? I've used VB in many of it's dialects for years now, sometimes as a hobbyist, sometimes for small business-related programs in a workgroup. As of the last 6 months I've been working on a big project, much bigger than I anticipated. Much of the sample source code out there is in C#. I don't have any burning desire to learn C#, but if there are things I'm missing out on that C# offers that VB doesn't (an opposite would be VB.NET offers XML Literals), then I'd like to know more about that feature. So in this case, it's often argued that C languages are case sensitive and that's good and VB is case insensitive and that is bad. I'd like to know A) how exactly is VB case insensitive because every single example in the code editor becomes case sensititive (meaning case gets corrected) whether I want it or not and B) is this compelling enough for me to consider moving to C# if VB.NET case is somehow limiting what I could do with code?

© Stack Overflow or respective owner

Related posts about vb

Related posts about vb.net