PC Review


Reply
Thread Tools Rate Thread

C# case sensitive or not

 
 
Finn Stampe Mikkelsen
Guest
Posts: n/a
 
      15th Nov 2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      15th Nov 2007
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
>

 
Reply With Quote
 
Chris Mullins [MVP - C#]
Guest
Posts: n/a
 
      15th Nov 2007
C# is case sensitive. So is Java, C, and C++, and a number of other
languages.

I personally think case sensivitity in a language is pretty silly, and much
prefer the VB approach. Unfortunatly, it's not something that's going to
change anytime soon...

In Visual Studio, you can work around this by hitting "Control-Space" alot.
This will auto-complete what you're typing, and fix the casing. If you're
already typed "messagebox", and hit "Control-Space" while your cusor is in
there, it'll change it to "MessageBox".

--
Chris Mullins

"Finn Stampe Mikkelsen" <(E-Mail Removed)> wrote in message
news:B6A66971-66D4-400C-AA93-(E-Mail Removed)...
> 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



 
Reply With Quote
 
Liz
Guest
Posts: n/a
 
      15th Nov 2007

"Finn Stampe Mikkelsen" <(E-Mail Removed)> wrote in message
news:B6A66971-66D4-400C-AA93-(E-Mail Removed)...
> 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 ...



 
Reply With Quote
 
Michael S
Guest
Posts: n/a
 
      15th Nov 2007
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" <(E-Mail Removed)> wrote in message
news:B6A66971-66D4-400C-AA93-(E-Mail Removed)...
> 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



 
Reply With Quote
 
=?Utf-8?B?QWRyaWFu?=
Guest
Posts: n/a
 
      15th Nov 2007
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
>

 
Reply With Quote
 
sloan
Guest
Posts: n/a
 
      15th Nov 2007

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" <(E-Mail Removed)> wrote in message
news:B6A66971-66D4-400C-AA93-(E-Mail Removed)...
> 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



 
Reply With Quote
 
Liz
Guest
Posts: n/a
 
      15th Nov 2007

"sloan" <(E-Mail Removed)> wrote in message
news:eBp%(E-Mail Removed)...

> I am thankful there is not a "disable case sensitivity" "feature" for C#.


for my nickel, it's actually insane, and leads to code like:

networkPackectsPerSecond = NetworkPackectsPerSecond;

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

that said, I'm used to it and don't really care

now, what really drove me crazy were the VB IDEs .. where you type:

let a = 1233

and the editor immediately transformed it to:

Let a = 1233

I won't even bother whining about the "Let" keyword ....


> My opinion is that case insensitive code is ugly.


you can always write your case-insensitive code as though it actually were
case-sensitive, no?



 
Reply With Quote
 
Alun Harford
Guest
Posts: n/a
 
      15th Nov 2007
Liz wrote:
> "sloan" <(E-Mail Removed)> wrote in message
> news:eBp%(E-Mail Removed)...
>
>> I am thankful there is not a "disable case sensitivity" "feature" for C#.

>
> for my nickel, it's actually insane, and leads to code like:
>
> networkPackectsPerSecond = NetworkPackectsPerSecond;
>
> 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"

Alun Harford
 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      15th Nov 2007
Alun Harford <(E-Mail Removed)> wrote:
> > 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 - <(E-Mail Removed)>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
countif function: how to distinguish case/make case sensitive mvwoolner Microsoft Excel Worksheet Functions 3 18th Mar 2009 02:18 PM
Case Sensitive w/ IF =?Utf-8?B?amVmZlA=?= Microsoft Excel Worksheet Functions 11 6th Feb 2006 01:16 AM
Case Sensitive Key? =?Utf-8?B?VFJvYg==?= Microsoft Access Getting Started 3 9th Jul 2005 07:33 AM
...not case sensitive malay_ko Microsoft Excel Worksheet Functions 3 28th Apr 2004 04:25 PM
case sensitive Mika Pitkänen Microsoft Access 4 19th Apr 2004 09:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:26 AM.