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

From Catglobe Wiki
Jump to: navigation, search
(Private member variables)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Issue 1==
+
== Private member variables<br> ==
====Discussion 1====
 
This is discussion 1
 
  
====Discussion 2====
+
==='''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'''===
This is discussion 2
+
 
 +
''=> 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 03: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;
}