Line 1: | Line 1: | ||
== Private member variables<br> == | == Private member variables<br> == | ||
==='''I would like that we have _camelCase as allowed for this specific case. It makes it easier to see in code when people are using private variables, using this. or not'''=== | |||
''=> a section for naming private/protected member's fields has been added into 3.4.1'' | |||
''<U>Camel case preceding by an underscore '_' for private/protected fields:</U>'' | |||
<FONT FACE="Courier New, monospace" SIZE=2 STYLE="font-size: 9pt" COLOR="#000000"> | |||
:<FONT COLOR="#0000ff">public </FONT><FONT COLOR="#0000ff">class </FONT><FONT COLOR="#2b91af"><U>SomeClass</U></FONT> | |||
:{ | |||
::<FONT COLOR="#0000ff">private </FONT><FONT COLOR="#0000ff">int </FONT>''_number''; | |||
::<FONT COLOR="#0000ff">protected </FONT><FONT COLOR="#0000ff">string </FONT>''_name''; | |||
:} | |||
</FONT> |
Latest revision as of 02:18, 9 December 2008
Private member variables
I would like that we have _camelCase as allowed for this specific case. It makes it easier to see in code when people are using private variables, using this. or not
=> a section for naming private/protected member's fields has been added into 3.4.1
Camel case preceding by an underscore '_' for private/protected fields:
- public class SomeClass
- {
- private int _number;
- protected string _name;
- }