From 4727faf42e315244d0902d6b908de05d2a2e334c Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sun, 7 Mar 2004 16:32:26 +0000 Subject: Updated coding guidelines svn path=/trunk/mcs/; revision=23765 --- mcs/class/README | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'mcs/class/README') 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 { -- cgit v1.2.3