473,326 Members | 2,813 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,326 software developers and data experts.

case sensitivity

I'm getting started with C# and was just wondering if C# veterans LIKE the
fact that the language is case sensitive. If so, how is case sensitivity
helpful? Do you create multiple variables, functions, and objects with
identical names that differ only in case?

Really wondering....

Jeff
Nov 15 '05 #1
5 1949

"Jeff S" <Je******@asdf.com> wrote in message
news:OP**************@TK2MSFTNGP12.phx.gbl...
I'm getting started with C# and was just wondering if C# veterans LIKE the
fact that the language is case sensitive.
I do.
If so, how is case sensitivity
helpful? Do you create multiple variables, functions, and objects with
identical names that differ only in case?


I don't, I really don't!
You've to understand that the fact that the language is case sensitive help
to trap errors as they occur, and the ability to visually recognize a
variable just by its consistent casing (How do I seperate XmlDocument &
XmlNavigator, I read the upper case letters and in 99% it allows me to know
what class is being used.
Just think of the resulting code:

XmlWrTier xNoCAsEisFUN = nEw xMLWRitER("foo.xml");
XnOCAseISFuN.Write();

This is an exteme example, but anything that helps is good.
And no good-coding-style manual will help you if the compiler isn't
enforcing this.
Nov 15 '05 #2
Jeff S <Je******@asdf.com> wrote:
I'm getting started with C# and was just wondering if C# veterans LIKE the
fact that the language is case sensitive.
I do.
If so, how is case sensitivity
helpful? Do you create multiple variables, functions, and objects with
identical names that differ only in case?


I often have a property and a variable which have the same name but
differ in case:

int count;
public int Count
{
get
{
return count;
}
}

etc.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #3
In most cases, I find it useful to not have to qualify members, like
properties, when I have a parameter or local of the same name. It is also
just very inbred, case sensitivity should be there(as all C based langauges
are case senstive, including java), its just how it works.
I also tend to do things like
public string Name
{
get
{
return name;
}
}
string name;

for properties.
"Jeff S" <Je******@asdf.com> wrote in message
news:OP**************@TK2MSFTNGP12.phx.gbl...
I'm getting started with C# and was just wondering if C# veterans LIKE the
fact that the language is case sensitive. If so, how is case sensitivity
helpful? Do you create multiple variables, functions, and objects with
identical names that differ only in case?

Really wondering....

Jeff

Nov 15 '05 #4
I don't particularily like that it is case-sensitive but I don't not like
it, either. The fact that it is case sensetive is simply just how it is
built. Sometimes it's daunting to remember to always type in the correct
case (when you type very fast by the time it registers in your brain that
there was a typo (I always know because it "felt" wrong when I typed it) I'm
already 15 characters ahead and have to backspace or arrow-key back to it
and it breaks the flow).

In VB I have mixed case but when I reference them I type in small case and
if it automatically corrects the case-sensitity I know I typed it in
correctly. I suppose C# will tell you also.

Where it is useful (albeit perhaps confusing) in C# is when I have a public
member mixed case and a local/private member small case. I never ever ever
use a small case type as a public referencable/usable
method/variable/object. But in some projects it can be confusing. In VB I
prepend an underscore if it is private or local. In C#, I don't have to, I
juse make 'em all small letters.

Yes... I do:

public class X {
private string name;

public string Name {
get() { return name; }
set() { name = value; }
}
}

I suppose that illustrates a simple example of the concept. At least, if
I'm consistant I'll never get lost in the code (even 13 months later -- I
know, I'm at that point). But we have other developers here and no standard
and it'll throw them off or you off but for the most part, everyone here is
adaptable and there have never been problems because of this, only because
of lack of code re-use but that's another thread topic.
Thanks,
Shawn
"Jeff S" <Je******@asdf.com> wrote in message
news:OP**************@TK2MSFTNGP12.phx.gbl...
I'm getting started with C# and was just wondering if C# veterans LIKE the
fact that the language is case sensitive. If so, how is case sensitivity
helpful? Do you create multiple variables, functions, and objects with
identical names that differ only in case?

Really wondering....

Jeff

Nov 15 '05 #5

"Shawn B." <le****@html.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I don't particularily like that it is case-sensitive but I don't not like
it, either. The fact that it is case sensetive is simply just how it is
built. Sometimes it's daunting to remember to always type in the correct
case (when you type very fast by the time it registers in your brain that
there was a typo (I always know because it "felt" wrong when I typed it) I'm already 15 characters ahead and have to backspace or arrow-key back to it
and it breaks the flow).


Alt+Space is your friend, if you've 15 letter vars, then IntelliSense is
sure to get the right one.

Nov 15 '05 #6

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...
761
by: Neo-LISPer | last post by:
Hey Recently, I researched using C++ for game programming and here is what I found: C++ game developers spend a lot of their time debugging corrupted memory. Few, if any, compilers offer...
16
by: Starwiz | last post by:
I'm a VB.net programmer, and I'm about to start working with two C++ programmers and teach them .net. I've decided to use C# in teaching them, since it's similar enough to VB.net that I can read...
3
by: Jason Tesser | last post by:
I am converting data from Access into Postgres and ran into an issue with case sensitivity. Can I write queries in Access that will be case insensitive without rewriting the queries. So I would...
14
by: Christian Sell | last post by:
Hello, I am running into a problem with PGs case sensitivity with regard to column and table names. I am using program components that require the object names returned from database metadata...
15
by: gregory_may | last post by:
Is there any options in VS 2005 to better handle case issues in C# (Similar to VB.Net)?
1
by: othellomy | last post by:
Is SQL server defaults to case insensitive? I am sure there are ways to install case sensitive SQL server instance but coming from Sybase (which is always case sensitive) case insensitivity is...
3
by: Anita Potekkat | last post by:
Hello, I had a question regarding Case Sensitivity in 10g & 9i. (1) Does Case Sensitivity in Oracle have to do with data only? Or does it also effect table & column names? For e.g. in a table...
2
by: sweetpotatop | last post by:
Hi, I believe my SQL server was configured as Case sensitivity. I have a number of stored procedures which were moved from a non-Case sensitivity SQL server. Because of the Case sensitivity, I...
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.