473,385 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

C# case sensitive or not

Hi

I'm totally new to C#, but have worked a bit with VB.NET...

trying to migrate to C#, i find one thing particular anoying... The case
sensitivity of C# or at least my C# environment of Visual Studio. Can this
be disabled??

I mean, it's hard enough to learn a new language, but to also remember that
listBox is spelled exactly like that with all small letter, but for the
capital B. And if not written like that i get an error...

Pse. help... if possible

/Finn

--
Der er 10 slags mennesker - Dem som forstår binær og dem som ikke gør.
There are 10 kinds of people. Those who understand binary ant those who
don't.
Es gibt 10 arten von menschen. Die die binär verstehen bzw. die die es nicht
tuhen

Nov 15 '07 #1
12 11041
C# is case - sensitive, just like Javascript, Java, C++ and the UNIX
operating system. Get over it.

--Peter
http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"Finn Stampe Mikkelsen" wrote:
Hi

I'm totally new to C#, but have worked a bit with VB.NET...

trying to migrate to C#, i find one thing particular anoying... The case
sensitivity of C# or at least my C# environment of Visual Studio. Can this
be disabled??

I mean, it's hard enough to learn a new language, but to also remember that
listBox is spelled exactly like that with all small letter, but for the
capital B. And if not written like that i get an error...

Pse. help... if possible

/Finn

--
Der er 10 slags mennesker - Dem som forstr binr og dem som ikke gr.
There are 10 kinds of people. Those who understand binary ant those who
don't.
Es gibt 10 arten von menschen. Die die binr verstehen bzw. die die es nicht
tuhen
Nov 15 '07 #2
Liz

"Finn Stampe Mikkelsen" <st****@city.dkwrote in message
news:B6**********************************@microsof t.com...
Hi

I'm totally new to C#, but have worked a bit with VB.NET...

trying to migrate to C#, i find one thing particular anoying... The case
sensitivity of C# or at least my C# environment of Visual Studio. Can this
be disabled??

I mean, it's hard enough to learn a new language, but to also remember
that listBox is spelled exactly like that with all small letter, but for
the capital B. And if not written like that i get an error...

Pse. help... if possible
lol .. how do you deal with things like bad weather, war, greed, hunger ?
look, I'll get this case-sensitivity thing fixed for you ...

Nov 15 '07 #3
Hehe.

I've been working in Delphi a lot,
and one of the key features missing;
was to be able to turn case-sens ON

- Michael Starberg
"Finn Stampe Mikkelsen" <st****@city.dkwrote in message
news:B6**********************************@microsof t.com...
Hi

I'm totally new to C#, but have worked a bit with VB.NET...

trying to migrate to C#, i find one thing particular anoying... The case
sensitivity of C# or at least my C# environment of Visual Studio. Can this
be disabled??

I mean, it's hard enough to learn a new language, but to also remember
that listBox is spelled exactly like that with all small letter, but for
the capital B. And if not written like that i get an error...

Pse. help... if possible

/Finn

--
Der er 10 slags mennesker - Dem som forstår binær og dem som ikke gør.
There are 10 kinds of people. Those who understand binary ant those who
don't.
Es gibt 10 arten von menschen. Die die binär verstehen bzw. die die es
nicht tuhen

Nov 15 '07 #4
I HATE VB's case insensitivity.

VB6 would automatically change the case of identifiers to what it thought
was the correct case - ugh! Does VB .Net still do this?

Case sensitivity allows a language to be a bit more expressive. That fact
that VB does not have it is just another demonstration of why it is for
kiddies.

Let the language wars commence!

"Finn Stampe Mikkelsen" wrote:
Hi

I'm totally new to C#, but have worked a bit with VB.NET...

trying to migrate to C#, i find one thing particular anoying... The case
sensitivity of C# or at least my C# environment of Visual Studio. Can this
be disabled??

I mean, it's hard enough to learn a new language, but to also remember that
listBox is spelled exactly like that with all small letter, but for the
capital B. And if not written like that i get an error...

Pse. help... if possible

/Finn

--
Der er 10 slags mennesker - Dem som forstr binr og dem som ikke gr.
There are 10 kinds of people. Those who understand binary ant those who
don't.
Es gibt 10 arten von menschen. Die die binr verstehen bzw. die die es nicht
tuhen
Nov 15 '07 #5

C# is case sensitive.

It's a discipline, one you'll quickly learn.

.........

I am thankful there is not a "disable case sensitivity" "feature" for C#.
My opinion is that case insensitive code is ugly.

"Finn Stampe Mikkelsen" <st****@city.dkwrote in message
news:B6**********************************@microsof t.com...
Hi

I'm totally new to C#, but have worked a bit with VB.NET...

trying to migrate to C#, i find one thing particular anoying... The case
sensitivity of C# or at least my C# environment of Visual Studio. Can this
be disabled??

I mean, it's hard enough to learn a new language, but to also remember
that listBox is spelled exactly like that with all small letter, but for
the capital B. And if not written like that i get an error...

Pse. help... if possible

/Finn

--
Der er 10 slags mennesker - Dem som forstår binær og dem som ikke gør.
There are 10 kinds of people. Those who understand binary ant those who
don't.
Es gibt 10 arten von menschen. Die die binär verstehen bzw. die die es
nicht tuhen

Nov 15 '07 #6
Alun Harford <de*****@alunharford.co.ukwrote:
which, ultimately, wastes a lot of time and strains a lot of eyes; I cannot
even begin to imagine a sensible rationale for case-sensitivity

Well I read that as "set the local variable networkPackectsPerSecond to
the value of the property NetworkPackectsPerSecond"
Exactly - and I prefer that to having to use prefixes and things to
indicate what's a variable, just because the language isn't capable of
differentiating things that a human clearly can.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 15 '07 #7
Adrian wrote:
Case sensitivity allows a language to be a bit more expressive. That fact
that VB does not have it is just another demonstration of why it is for
kiddies.
Are you a master if the two languages for kiddies called Ada and PL/I ?

:-)

Arne
Nov 16 '07 #8
Liz

"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP********************@msnews.microsoft.com.. .
Alun Harford <de*****@alunharford.co.ukwrote:
which, ultimately, wastes a lot of time and strains a lot of eyes; I
cannot
even begin to imagine a sensible rationale for case-sensitivity

Well I read that as "set the local variable networkPackectsPerSecond to
the value of the property NetworkPackectsPerSecond"
Exactly - and I prefer that to having to use prefixes and things to
indicate what's a variable, just because the language isn't capable of
differentiating things that a human clearly can.
is it really a significant burden to write:

networkPackectsPerSecond = _networkPackectsPerSecond
-- instead of --
networkPackectsPerSecond = NetworkPackectsPerSecond

which do you suppose you could recognize more quickly in a well-controlled
laboratory test?

Humans can also (generally) read instructions in 6 pt type on medicine
bottles but sometimes they read it wrong and get sick or die

this IS a language that won't let you use pointers we're talking about ...
seems a bit inconsistent in approach to me
Nov 16 '07 #9
Liz wrote:
"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP********************@msnews.microsoft.com.. .
>Exactly - and I prefer that to having to use prefixes and things to
indicate what's a variable, just because the language isn't capable of
differentiating things that a human clearly can.

is it really a significant burden to write:

networkPackectsPerSecond = _networkPackectsPerSecond
-- instead of --
networkPackectsPerSecond = NetworkPackectsPerSecond

which do you suppose you could recognize more quickly in a well-controlled
laboratory test?

Humans can also (generally) read instructions in 6 pt type on medicine
bottles but sometimes they read it wrong and get sick or die

this IS a language that won't let you use pointers we're talking about ...
seems a bit inconsistent in approach to me
I think underscore is a bad example - that can actually also
be missed in certain fonts & displays.

I would also prefer programming languages to be case insensitive.

But there are not much point in this discussion.

Someone decided that C# should follow the C++ and Java tradition.

It is 100% sure that it will never be changed. It would break a
lot of code.

Learn to live with it.

Arne
Nov 16 '07 #10
Liz <li*@tiredofspam.comwrote:
Exactly - and I prefer that to having to use prefixes and things to
indicate what's a variable, just because the language isn't capable of
differentiating things that a human clearly can.

is it really a significant burden to write:

networkPackectsPerSecond = _networkPackectsPerSecond
-- instead of --
networkPackectsPerSecond = NetworkPackectsPerSecond
I find the readability of the first to be less. The extra underscore
gets in the way of my mental reading.
which do you suppose you could recognize more quickly in a well-controlled
laboratory test?

Humans can also (generally) read instructions in 6 pt type on medicine
bottles but sometimes they read it wrong and get sick or die

this IS a language that won't let you use pointers we're talking about ...
Not a good choice of example, seeing as C# *does* let you use pointers.
seems a bit inconsistent in approach to me
It's entirely consistent with C#'s syntax approach being the same as
Java, C, C++.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 16 '07 #11
Liz

"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP*********************@msnews.microsoft.com. ..
Liz <li*@tiredofspam.comwrote:
>this IS a language that won't let you use pointers we're talking about
...

Not a good choice of example, seeing as C# *does* let you use pointers.
>seems a bit inconsistent in approach to me

It's entirely consistent with C#'s syntax approach being the same as
Java, C, C++.

c'mon, Jon, you get the gist of what I'm saying: C# is heavily biased
towards a paternalistic protect yourself (or your employer) from your own
stupidity approach .. which is not at all consistent with C/C++ ...
Nov 16 '07 #12
Liz <li*@tiredofspam.comwrote:
It's entirely consistent with C#'s syntax approach being the same as
Java, C, C++.

c'mon, Jon, you get the gist of what I'm saying: C# is heavily biased
towards a paternalistic protect yourself (or your employer) from your own
stupidity approach .. which is not at all consistent with C/C++ ...
Well, it has avoided some (but not all) of the ways of shooting you in
the foot that C and C++ have. But then, I don't remember the last time
that I *did* shoot myself in the foot with C# due to case sensitivity.

If you don't trust yourself not to write:

Foo = Foo;

instead of

Foo = foo;

then you can still use prefixes if you *want* to.

I'm personally glad that C# is case-sensitive.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 16 '07 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

32
by: Elliot Temple | last post by:
Hi I have two questions. Could someone explain to me why Python is case sensitive? I find that annoying. Also, why aren't there multiline comments? Would adding them cause a problem of some...
9
by: Paul Smith | last post by:
This doesn't seem like it should be *that* difficult, but after quite some time trying to figure it out, I'm still banging my head against the wall. My objective is to examine the exact...
2
by: Matthew Louden | last post by:
I am using VBScript for ASP. The control value must be case sensitive? The following example should print the "fname" value, but if if I change "submit" back to "SUBMIT". Then it works fine. <%...
5
by: Madjid Nasiri | last post by:
Hi, I am basic in oracle. My Old programs write with Delphi and Databases: Access, Paradox, MySQL, Microsoft SQL. I write my code (SQL code) case-insensitivae, but now i need use oracle database....
2
by: J. Muenchbourg | last post by:
I'm doing a few tests with simple .net scripts, and I noticed that I display the following error message at ErrMessage.Text if I don't enter "BLUE" in capital letters into my input textbox: ...
15
by: Thomas Scheiderich | last post by:
I thought I read that the case for the variable names is important. For example Dim Wheel As Integer Wheel here is a different variable from WHEEL. Is this correct?
4
by: xAvailx | last post by:
Hello: I didn't find any documentation that notes save point names are case sensitive, but I guess they are... Stored Proc to reproduce: /* START CODE SNIPPET */ If Exists (Select * From...
38
by: Bart | last post by:
Why is C case sensitive? I know it's a bit late to change it now but there would seem to be far more advantages in ignoring letter case in source code. In real life such a situation would be...
2
by: Lucky | last post by:
Hi guys, I'm having problem with case sensitive collation of SQL Database. one my client is having case sensitive database. While developing the Data Layer i didn't consider this scenario. the...
11
by: Rafe | last post by:
Hi, I'm working within an application (making a lot of wrappers), but the application is not case sensitive. For example, Typing obj.name, obj.Name, or even object.naMe is all fine (as far as...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.