Click here to Skip to main content
15,885,278 members
Home / Discussions / C#
   

C#

 
GeneralRe: Field Naming Pin
jsc4217-Mar-16 23:06
professionaljsc4217-Mar-16 23:06 
GeneralRe: Field Naming Pin
OriginalGriff16-Mar-16 6:47
mveOriginalGriff16-Mar-16 6:47 
AnswerRe: Field Naming Pin
Gerry Schmitz16-Mar-16 6:45
mveGerry Schmitz16-Mar-16 6:45 
GeneralMessage Removed Pin
16-Mar-16 8:13
professionalN_tro_P16-Mar-16 8:13 
GeneralRe: Field Naming Pin
Gerry Schmitz16-Mar-16 9:08
mveGerry Schmitz16-Mar-16 9:08 
AnswerRe: Field Naming Pin
Sascha Lefèvre16-Mar-16 7:49
professionalSascha Lefèvre16-Mar-16 7:49 
GeneralMessage Removed Pin
16-Mar-16 8:04
professionalN_tro_P16-Mar-16 8:04 
GeneralRe: Field Naming Pin
Sascha Lefèvre16-Mar-16 8:44
professionalSascha Lefèvre16-Mar-16 8:44 
N_tro_P wrote:
That is what Griff said he does as well.
Not quite - Griff seems to use pascalCase for fields, requiring a this for initialization from parameters.

N_tro_P wrote:
So what do we do here? Should they have an underscore?
I should have been more precise: I use the underscore only for a field if there is a property which returns that one field and possibly sets that one field (which introduces the problem of wanting to name the field like the property). So in your example I wouldn't use underscores because the properties return computed values, thus have a different meaning than any field and therefore will be named differently from any field.

N_tro_P wrote:
where this fails is when extensions occur. A new requirement is added to a component that is a simple one. Expose someField with a public accessor. Now you must modify all usages of the field.
Yes, unless you can just change the field into a property. Lacking any sort of co-worker this hasn't been a problem for me Laugh | :laugh:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

GeneralMessage Removed Pin
16-Mar-16 8:47
professionalN_tro_P16-Mar-16 8:47 
GeneralRe: Field Naming Pin
Sascha Lefèvre16-Mar-16 8:54
professionalSascha Lefèvre16-Mar-16 8:54 
GeneralMessage Removed Pin
17-Mar-16 3:34
professionalN_tro_P17-Mar-16 3:34 
GeneralRe: Field Naming Pin
OriginalGriff16-Mar-16 9:15
mveOriginalGriff16-Mar-16 9:15 
QuestionLooking for a .Net Named-Lock-Manager Pin
Sascha Lefèvre16-Mar-16 2:43
professionalSascha Lefèvre16-Mar-16 2:43 
AnswerRe: Looking for a .Net Named-Lock-Manager Pin
Gerry Schmitz16-Mar-16 5:02
mveGerry Schmitz16-Mar-16 5:02 
GeneralRe: Looking for a .Net Named-Lock-Manager Pin
Sascha Lefèvre16-Mar-16 5:31
professionalSascha Lefèvre16-Mar-16 5:31 
GeneralRe: Looking for a .Net Named-Lock-Manager Pin
Gerry Schmitz16-Mar-16 5:54
mveGerry Schmitz16-Mar-16 5:54 
GeneralRe: Looking for a .Net Named-Lock-Manager Pin
Sascha Lefèvre16-Mar-16 7:54
professionalSascha Lefèvre16-Mar-16 7:54 
GeneralRe: Looking for a .Net Named-Lock-Manager Pin
Gerry Schmitz16-Mar-16 8:31
mveGerry Schmitz16-Mar-16 8:31 
GeneralRe: Looking for a .Net Named-Lock-Manager Pin
Sascha Lefèvre16-Mar-16 9:12
professionalSascha Lefèvre16-Mar-16 9:12 
GeneralRe: Looking for a .Net Named-Lock-Manager Pin
Gerry Schmitz16-Mar-16 9:23
mveGerry Schmitz16-Mar-16 9:23 
GeneralRe: Looking for a .Net Named-Lock-Manager Pin
Sascha Lefèvre16-Mar-16 9:34
professionalSascha Lefèvre16-Mar-16 9:34 
QuestionHow to multiselect DataGridView rows without pressing CTRL key in c#? Pin
naouf1016-Mar-16 2:33
naouf1016-Mar-16 2:33 
AnswerRe: How to multiselect DataGridView rows without pressing CTRL key in c#? Pin
OriginalGriff16-Mar-16 3:43
mveOriginalGriff16-Mar-16 3:43 
AnswerRe: How to multiselect DataGridView rows without pressing CTRL key in c#? Pin
Gerry Schmitz16-Mar-16 5:24
mveGerry Schmitz16-Mar-16 5:24 
Questionimage "stacking" Pin
V.15-Mar-16 21:09
professionalV.15-Mar-16 21:09 

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.