@@ -10,26 +10,26 @@ If you want to add your plugin, theme or extension to AppMan, you need to do a p
10
10
11
11
##### Use spaces instead of tabs with a width of 4
12
12
13
- ```
13
+ ``` c#
14
14
public bool IsMember ()
15
15
{
16
- if (this.value > 2))
17
- {
18
- return false;
19
- }
16
+ if (this .value > 2 )
17
+ {
18
+ return false ;
19
+ }
20
20
else return true ;
21
21
}
22
22
```
23
23
24
24
##### Naming should be in English and clear
25
25
26
- ```
26
+ ``` c#
27
27
private int memberProperty = 0 ;
28
28
```
29
29
30
30
##### Use camelCase for private members and uppercase for public properties, methods and types:
31
31
32
- ```
32
+ ``` c#
33
33
private int memberProperty = 0 ;
34
34
35
35
public string MemberName = " MemberName" ;
@@ -42,7 +42,7 @@ public bool IsMember()
42
42
43
43
##### Use types without explicit path:
44
44
45
- ```
45
+ ``` c#
46
46
private void OnFormActivate (object sender , /* System.*/ EventArgs e )
47
47
{
48
48
// Do something...
@@ -51,7 +51,7 @@ private void OnFormActivate(object sender, /*System.*/EventArgs e)
51
51
52
52
##### Do not use extensive extra empty lines and keep the code clean, not like:
53
53
54
- ```
54
+ ``` c#
55
55
// Comment...
56
56
private int memberMethod (int value )
57
57
{
@@ -88,7 +88,7 @@ private int memberMethod(int value)
88
88
89
89
##### Use brackets and parenthesis for easier readability:
90
90
91
- ```
91
+ ``` c#
92
92
if ((val1 > val2 ) && (val1 > val3 ))
93
93
{
94
94
if (val2 > val3 )
@@ -100,7 +100,7 @@ if ((val1 > val2) && (val1 > val3))
100
100
101
101
##### Do not nest expressions without brackets:
102
102
103
- ```
103
+ ``` c#
104
104
if (val1 > val2 && val1 > val3 )
105
105
106
106
if (val2 > val3 )
@@ -111,7 +111,7 @@ if (val1 > val2 && val1 > val3)
111
111
112
112
##### Use can use one liners to shorten the code:
113
113
114
- ```
114
+ ``` c#
115
115
if (val1 > val2 && val1 > val3 )
116
116
{
117
117
if (val2 > val3 ) doThing ();
@@ -120,7 +120,7 @@ if (val1 > val2 && val1 > val3)
120
120
121
121
##### Use explicit types:
122
122
123
- ```
123
+ ``` c#
124
124
int myValue = 0 ;
125
125
Point [] myPoints = new Point []
126
126
{
@@ -131,7 +131,7 @@ Point[] myPoints = new Point[]
131
131
132
132
##### Code example:
133
133
134
- ```
134
+ ```c #
135
135
import System ;
136
136
137
137
namespace MyNameSpace
@@ -166,7 +166,7 @@ namespace MyNameSpace
166
166
public void MemberMethod (int value )
167
167
{
168
168
int temp = CONSTANT ;
169
- if (value > 2))
169
+ if (value > 2 )
170
170
{
171
171
this .memberProperty2 = temp ;
172
172
this .memberProperty3 = temp ;
0 commit comments