I'm going through a Wrox book on asp.net. I'm just curious that if VB is
not case-sensitive, why does it let you get away with this?
Dim dataSet As DataSet = LoadMyCalendarData
I would think think the compiler would flag you in one way or another
because of a reserved word.
Christopher Reed - 01 Mar 2006 13:39 GMT
DataSet is not a reserved word in VB. Thus, the compiler won't flag it.
Hence, only the Framework itself would have a reason to complain.
Note also that the Framework is written in C#, so this may be a reason why
is doesn't complain, though this is only speculation on my part.

Signature
Christopher A. Reed
"The oxen are slow, but the earth is patient."
> I'm going through a Wrox book on asp.net. I'm just curious that if VB is
> not case-sensitive, why does it let you get away with this?
[quoted text clipped - 3 lines]
> I would think think the compiler would flag you in one way or another
> because of a reserved word.
Mary Chipman [MSFT] - 08 Mar 2006 14:39 GMT
Basically because the AS keyword tells the compiler which is a
variable and which is an object. The main difference is that VB
doesn't care if you declare something AS dataSet, but in C# it won't
compile. However, you can't have two dataSet variables in the same
scope (which goes without saying). So what is really meant is that VB
is not case-sensitive with the keywords themselves, not with comparing
case-sensitivity between variables and keywords.
BTW, using camel case is now accepted practice, which is why you see
it in the Wrox book. Everyone is moving away from the selfish naming
convention (MyDataSet).
--Mary
>I'm going through a Wrox book on asp.net. I'm just curious that if VB is
>not case-sensitive, why does it let you get away with this?
[quoted text clipped - 3 lines]
>I would think think the compiler would flag you in one way or another
>because of a reserved word.