Click here to Skip to main content
15,896,912 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataGrid "Refresh" Pin
vladmihai24-May-03 5:12
vladmihai24-May-03 5:12 
GeneralC# Learning Curve Pin
Iceman24-May-03 4:10
Iceman24-May-03 4:10 
GeneralRe: C# Learning Curve Pin
Nick Parker24-May-03 4:56
protectorNick Parker24-May-03 4:56 
GeneralRe: C# Learning Curve Pin
peterchen24-May-03 7:42
peterchen24-May-03 7:42 
GeneralRe: C# Learning Curve Pin
leppie24-May-03 13:54
leppie24-May-03 13:54 
GeneralRe: C# Learning Curve Pin
Rocky Moore25-May-03 4:52
Rocky Moore25-May-03 4:52 
GeneralRe: C# Learning Curve Pin
James T. Johnson25-May-03 11:54
James T. Johnson25-May-03 11:54 
GeneralRe: C# Learning Curve Pin
Rocky Moore25-May-03 15:16
Rocky Moore25-May-03 15:16 
James T. Johnson wrote:
The style I use, which is (or was) adopted from MS's recommended style:

Well, a lot of code from Microsoft still has underlining. Seems many still are not with the program Wink | ;)

This is the style I have used since I started but I have ran into a little problem with this though. If you have a private variable called "customerID" and you have a property called "CustomerID", when you build a contructor and pass in a varible, it looks off to have a parameter "customerID" and be forced to use the "this." in front of the member variable. That is the only I have found where some prefix on member variables could be a good thing.

One of my other pet peeves is that C# does not allow private variables at method level. I know it is not that big of thing to have them declared at class level and some people reason that it should be declared there to make it more obvious that it exists. Personally, I think the knowledge of the variable should only be at the method level, nothing outside the method should know or have access to the variable. But I understand that "static" does not quite mean the same thing as it did in our C++ world.

James T. Johnson wrote:
I don't always follow this one, especially when I have something like CustomerID. Putting a lowercase 'd' there just looks wrong.

I agree with that. I still use "customer_ID" in mine which is the only time I use an underline.



Rocky Moore <><
GeneralRe: C# Learning Curve Pin
David Stone26-May-03 8:00
sitebuilderDavid Stone26-May-03 8:00 
QuestionDesign time control in Run time program? Pin
novachen23-May-03 21:24
novachen23-May-03 21:24 
AnswerRe: Design time control in Run time program? Pin
leppie24-May-03 0:30
leppie24-May-03 0:30 
GeneralPictureBox drag Pin
azusakt23-May-03 16:35
azusakt23-May-03 16:35 
GeneralImageList Pin
SherylK23-May-03 11:56
SherylK23-May-03 11:56 
GeneralRe: ImageList Pin
tuan_tomy25-May-03 21:44
tuan_tomy25-May-03 21:44 
GeneralListView Pin
hurlie23-May-03 8:30
hurlie23-May-03 8:30 
GeneralRemoving null characters from strings Pin
S O S23-May-03 5:01
S O S23-May-03 5:01 
GeneralRe: Removing null characters from strings Pin
NHM23-May-03 5:07
NHM23-May-03 5:07 
GeneralRe: Removing null characters from strings Pin
S O S24-May-03 1:35
S O S24-May-03 1:35 
GeneralRe: Removing null characters from strings Pin
Bo Hunter24-May-03 7:56
Bo Hunter24-May-03 7:56 
GeneralRe: Removing null characters from strings Pin
S O S24-May-03 10:41
S O S24-May-03 10:41 
GeneralRe: Removing null characters from strings Pin
Acidis31-May-03 9:33
Acidis31-May-03 9:33 
GeneralRe: Removing null characters from strings Pin
Acidis1-Jun-03 10:05
Acidis1-Jun-03 10:05 
GeneralRecordSets &amp;&amp; DataSets Pin
NHM23-May-03 5:00
NHM23-May-03 5:00 
GeneralPlease help: System.Resources.MissingManifestResourceException Pin
Mertli Ozgur Nevres23-May-03 4:42
Mertli Ozgur Nevres23-May-03 4:42 
Generalmenu item with image Pin
NHM23-May-03 4:05
NHM23-May-03 4:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.