Skip to content

Commit 3a1fa20

Browse files
committed
Update CONTRIBUTING.md
1 parent e0f460f commit 3a1fa20

File tree

1 file changed

+32
-19
lines changed

1 file changed

+32
-19
lines changed

CONTRIBUTING.md

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,33 @@ If you want to add your plugin, theme or extension to AppMan, you need to do a p
88

99
# Coding style
1010

11+
##### Use spaces instead of tabs with a width of 4
12+
13+
```
14+
public bool IsMember()
15+
{
16+
if (this.value > 2))
17+
{
18+
return false;
19+
}
20+
else return true;
21+
}
22+
```
23+
1124
##### Naming should be in English and clear
1225

1326
```
14-
private Int32 memberProperty = 0;
27+
private int memberProperty = 0;
1528
```
1629

1730
##### Use camelCase for private members and uppercase for public properties, methods and types:
1831

1932
```
20-
private Int32 memberProperty = 0;
33+
private int memberProperty = 0;
2134
22-
public String MemberName = "MemberName";
35+
public string MemberName = "MemberName";
2336
24-
public Boolean IsMember()
37+
public bool IsMember()
2538
{
2639
return true;
2740
}
@@ -30,7 +43,7 @@ public Boolean IsMember()
3043
##### Use types without explicit path:
3144

3245
```
33-
private void OnFormActivate(Object sender, /*System.*/EventArgs e)
46+
private void OnFormActivate(object sender, /*System.*/EventArgs e)
3447
{
3548
// Do something...
3649
}
@@ -40,7 +53,7 @@ private void OnFormActivate(Object sender, /*System.*/EventArgs e)
4053

4154
```
4255
// Comment...
43-
private Int32 memberMethod(Int32 value)
56+
private int memberMethod(int value)
4457
{
4558
4659
@@ -108,7 +121,7 @@ if (val1 > val2 && val1 > val3)
108121
##### Use explicit types:
109122

110123
```
111-
Int32 myValue = 0;
124+
int myValue = 0;
112125
Point[] myPoints = new Point[]
113126
{
114127
new Point(1, 1),
@@ -126,33 +139,33 @@ namespace MyNameSpace
126139
class MyClass
127140
{
128141
// Comment here...
129-
private Int32 memberProperty = 0;
130-
private Int32 memberProperty2 = 1;
131-
private Int32 memberProperty3 = 2;
142+
private int memberProperty = 0;
143+
private int memberProperty2 = 1;
144+
private int memberProperty3 = 2;
132145
133146
// Comment here...
134-
public String MemberName = "MemberName";
147+
public string MemberName = "MemberName";
135148
136149
// Comment here...
137-
public static Boolean IsMemberProperty = false;
150+
public static bool IsMemberProperty = false;
138151
139152
// Comment here...
140-
public const Int32 CONSTANT = 1;
153+
public const int CONSTANT = 1;
141154
142155
/// <summary>
143156
/// Comment here...
144157
/// </summary>
145-
public Boolean IsMember()
158+
public bool IsMember()
146159
{
147160
return true;
148161
}
149162
150163
/// <summary>
151164
/// Comment here...
152165
/// </summary>
153-
public void MemberMethod(Int32 value)
166+
public void MemberMethod(int value)
154167
{
155-
Int32 temp = MyClass.CONSTANT;
168+
int temp = CONSTANT;
156169
if (value > 2))
157170
{
158171
this.memberProperty2 = temp;
@@ -164,9 +177,9 @@ namespace MyNameSpace
164177
/// <summary>
165178
/// Comment here...
166179
/// </summary>
167-
private Int32 MemberMethodEx(Int32 value)
180+
private int MemberMethodEx(int value)
168181
{
169-
Int32 temp = MyClass.CONSTANT;
182+
int temp = CONSTANT;
170183
this.memberProperty3 = temp;
171184
switch (value)
172185
{
@@ -182,7 +195,7 @@ namespace MyNameSpace
182195
/// <summary>
183196
/// Comment here...
184197
/// </summary>
185-
private void OnFormActivate(Object sender, EventArgs e)
198+
private void OnFormActivate(object sender, EventArgs e)
186199
{
187200
this.MemberMethod(null, null);
188201
}

0 commit comments

Comments
 (0)