C# case sensitivity and VS.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there an option in VS IDE which can be set for automatically fixing of
C#'s case sensitivity typing errors?

Ex.
if I type getLength , I want VS to convert it into GetLength.


Thanks
 
Is there an option in VS IDE which can be set for automatically fixing of
C#'s case sensitivity typing errors?

Ex.
if I type getLength , I want VS to convert it into GetLength.

It will if you complete it with Intellisense - i.e. type getle and hit
Ctrl+Space, then select GetLength and hit tab.
 
no. because in C#, IDE cannot just assume difference in casing is a typing error. it is perfectly legal (though terrible programming practice) to have a variable foo and another variable Foo in the same scope. you just need to give up your bad legacy habit from VB ( another reason why VB is evil :) ) and start training your fingers, paying more attention to correct casing. follow standard naming convention is a starter

----- Trebor wrote: ----

Is there an option in VS IDE which can be set for automatically fixing o
C#'s case sensitivity typing errors

Ex
if I type getLength , I want VS to convert it into GetLength


Thank
 
....but isn't one of the C# conventions to use "foo" for a private variable,
and use "Foo" for the public property that exposes that private variable?

Daniel Jin said:
no. because in C#, IDE cannot just assume difference in casing is a
typing error. it is perfectly legal (though terrible programming practice)
to have a variable foo and another variable Foo in the same scope. you just
need to give up your bad legacy habit from VB ( another reason why VB is
evil :) ) and start training your fingers, paying more attention to correct
casing. follow standard naming convention is a starter.
 
C P said:
...but isn't one of the C# conventions to use "foo" for a private variable,
and use "Foo" for the public property that exposes that private variable?

Yes, it is. I would agree that it would be bad practice to have both as
*variables*, but I personally use the convention of variable foo,
property Foo.
 
Back
Top