Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2004-03-07 19:32:26 +0300
committerMiguel de Icaza <miguel@gnome.org>2004-03-07 19:32:26 +0300
commit4727faf42e315244d0902d6b908de05d2a2e334c (patch)
treea3b72c7acc98e3f137cc4983a41fe7161fa5ffc6 /mcs/class/README
parent5cadac1ca132a80a43b01b364934d2eb00e9d599 (diff)
Updated coding guidelines
svn path=/trunk/mcs/; revision=23765
Diffstat (limited to 'mcs/class/README')
-rw-r--r--mcs/class/README39
1 files changed, 39 insertions, 0 deletions
diff --git a/mcs/class/README b/mcs/class/README
index bf82cecee7f..edb4d0f65cc 100644
--- a/mcs/class/README
+++ b/mcs/class/README
@@ -224,6 +224,45 @@ testing.
void Method (string lpstrArgument)
void Method (string my_string)
+ * Empty methods: They should have the body of code using two
+ lines, in consistency with the rest:
+
+ good:
+ void EmptyMethod ()
+ {
+ }
+
+ bad:
+ void EmptyMethod () {}
+
+ void EmptyMethod ()
+ {}
+
+ * Line length: The line length for C# source code is 134 columns.
+
+
+ If your function declaration arguments go beyond
+ this point, please align your arguments to match the
+ opening brace, like this:
+
+ void Function (int arg, string argb,
+ int argc)
+ {
+ }
+
+ When invoking functions, the rule is different, the
+ arguments are not aligned with the previous
+ argument, instead they begin at the tabbed position,
+ like this:
+
+ void M ()
+ {
+ MethodCall ("Very long string that will force",
+ "Next argument on the 8-tab pos",
+ "Just like this one")
+
+ }
+
Here are a couple of examples:
class X : Y {