Difference between revisions of "Talk:Coding guideline - Common rules"

From Catglobe Wiki
Jump to: navigation, search
(Private member variables)
(Private member variables)
 
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<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''
+
''=> 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 04: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;
}