DataSet and dataSet

J

JimO

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.
 
C

Christopher Reed

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.
 
M

Mary Chipman [MSFT]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Dataset/Adapter issue 0
Dataset Headaches 9
Post Back and DataSet 1
Dataset Designer problems 0
ASP.NET and Dataset 3
XML, DataSet, DataGrid 3
DataSet and GridView 0
Renaming a Dataset 1

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top