Is there any options in VS 2005 to better handle case issues in C# (Similar
to VB.Net)? 15 1543
Not sure that I understand your question .... C# is, by it's nature case
sensitive .... so that is not a configurable option ....
gregory_may wrote: Is there any options in VS 2005 to better handle case issues in C# (Similar to VB.Net)?
> Is there any options in VS 2005 to better handle case issues in C# (Similar to VB.Net)?
You would not want to do that since writing code of this kind:
MyType myType = new MyType();
Is a widespread (and valid, language-wise) practice... Or did I
misunderstand your question?
It sounds like what you are asking is "Is there any way I can make the C#
language be case-insensitive like Visual Basic.NET?"
The answer is, of course, no, you cannot. C# is case - sensitive,, as is
C++, Javascript, and the Unix filesystem. That's a good thing!
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"gregory_ma y" wrote: Is there any options in VS 2005 to better handle case issues in C# (Similar to VB.Net)?
Ok, last time I was using VS2003 with C# the editor seemed to get confused
if I was using different cases (or a typo).
In VB.Net, the editor can always find the right object (since it doesn't
care about case).
Has the Editor improved any to let me better use auto-complete
(intellisense) on mixed case objects ...or at least help me identify a typo?
"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message
news:5B******** *************** ***********@mic rosoft.com... It sounds like what you are asking is "Is there any way I can make the C# language be case-insensitive like Visual Basic.NET?"
The answer is, of course, no, you cannot. C# is case - sensitive,, as is C++, Javascript, and the Unix filesystem. That's a good thing! Peter
-- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com
"gregory_ma y" wrote:
Is there any options in VS 2005 to better handle case issues in C# (Similar to VB.Net)?
Yes, as you start to type, intellisense suggests auto-completions for what
you are typing, regardless of the casing. If you select an element off the
list, it is pasted with the correct casing.
Also, the identifier is colored in black if it could not be found. It is
greenish-colored if it could be found, so you can see at a glance if the
class/struct/etc... can be seen by VS.
2 words.. not trying to be mean but it will probably come across that way
"Program better!"
Not wanting to care about case is IMHO crazy.. I hate looking through code
that looks like this:
int MyID;
myid=10;
if(myID > 100)
mYId = 1;
else
myiD++;
Now that is an extreme example but it kind of shows what I mean. If you
call something MyID then call it that.
If you really dont want to worry about case then just use all lower
letters.. At least all references to the variables would be consistant.
int myid;
myid=10;
if(myid > 100)
myid = 1;
else
myid++;
Consistancy is rule #1 in my book. No matter what you are talking about.
"gregory_ma y" <None> wrote in message
news:Ov******** ******@TK2MSFTN GP10.phx.gbl... Is there any options in VS 2005 to better handle case issues in C# (Similar to VB.Net)?
Awesome!
It felt like my left foot was cut off in VS2003. I refused to use C#
because the editor was so poorly integrated (compared to VB.NET)..... sounds
like I can finally start looking at C# again.
"Gabriel Magaña" <no*****@no-spam.com> wrote in message
news:er******** ******@TK2MSFTN GP14.phx.gbl... Yes, as you start to type, intellisense suggests auto-completions for what you are typing, regardless of the casing. If you select an element off the list, it is pasted with the correct casing.
Also, the identifier is colored in black if it could not be found. It is greenish-colored if it could be found, so you can see at a glance if the class/struct/etc... can be seen by VS.
<"gregory_may " <None>> wrote: Awesome!
It felt like my left foot was cut off in VS2003. I refused to use C# because the editor was so poorly integrated (compared to VB.NET)..... sounds like I can finally start looking at C# again.
Actually, that behaviour was in VS 2003 for C# as well. Just hit
Ctrl-Space to complete something regardless of case.
--
Jon Skeet - <sk***@pobox.co m> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
VS2003 Intellisense also does case-insensitive identifier completion.
Problems crop up for me only when I use two identifiers that differ
only by case, for example:
public class A
{
private string abcd;
...
public string Abcd { get { return this.abcd; } }
}
within class A, typing "this.abcd" would choose either the field or the
property, depending upon which was more often used. I solved the
problem simply by changing conventions for naming identifiers. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 sort?
Thanks,
Elliot
|
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 completely safe modes.
Unsurprisingly, there is a very high failure rate among projects using
C++ for modern game development.
|
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 and write it, and
it's what's most familiar to them.
My major problem with C#, however, is its case-
sensitivity. I've heard people talk about...
|
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 like to know if
this be handled in Postgres or even if someone knows in Access. Thank
you.
|
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 queries to be in uppercase. Therefore, I am
forced to use double quotes in the table creation scripts, like
create table "BLA" ();
However, after...
| |
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 something new to
me (it requires coding change etc).
Besides, is there any option I can set to turn on case sensitivity or I
am stuck with it? (I can...
|
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 NAMES with column NAME are the following queries equivalent regardless of whether case sensitivity is turned on or off.
select name from names;...
|
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 have to do
a lot of editing in those stored procedures. Is there a quick way to
avoid the editing?
Something like ignoring the case in one...
|
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 problem is I've all Store Procedures in the Database and I'm using
sqlcommand to execute those SPs with Parameters.
for e.g.
Data Layer:
.........
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |