From f00566a71f01320f5cac5e7dd80f3d3705d8b2d0 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Fri, 1 Mar 2002 05:24:34 +0000 Subject: Updated guildeines svn path=/trunk/mcs/; revision=2794 --- mcs/class/README | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'mcs/class/README') diff --git a/mcs/class/README b/mcs/class/README index 00320a50792..9e0a280b865 100644 --- a/mcs/class/README +++ b/mcs/class/README @@ -34,7 +34,7 @@ the restricted dll found in the same directory. [MonoTODO] int MyFunction () { - throw new Exception ("Unimplemented"); + throw new NotImplementedException (); } * Tagging buggy code @@ -99,16 +99,17 @@ the restricted dll found in the same directory. A few guidelines: * Use a space before an opening parenthesis when calling - functions, like this: + functions, or indexing, like this: method (a); + b [10]; * Do not put a space after the opening parenthesis and the closing one, ie: - good: method (a); + good: method (a); array [10]; - bad: method ( a ); + bad: method ( a ); array[ 10 ]; * Inside a code block, put the opening brace on the same line as the statement: @@ -150,8 +151,9 @@ the restricted dll found in the same directory. void Method () { } - * Properties are an exception, keep the brace on the same line - as the property declaration. Rationale: this makes it visually + * Properties and indexers are an exception, keep the + brace on the same line as the property declaration. + Rationale: this makes it visually simple to distinguish them. good: @@ -197,6 +199,16 @@ the restricted dll found in the same directory. * If you are modyfing someone else's code, and your contribution is significant, please add yourself to the Authors list. + * Switch statements have the case at the same indentation as the + switch: + + switch (x) { + case 'a': + ... + case 'b': + ... + } + Here are a couple of examples: class X : Y { -- cgit v1.2.3