Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit 286526c

Browse files
Neal Gafterdanmoseley
Neal Gafter
authored andcommitted
Permit nested using without indentation (#31816)
1 parent cec9910 commit 286526c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/coding-guidelines/coding-style.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ For non code files (xml, etc), our current best guidance is consistency. When ed
77

88
The general rule we follow is "use Visual Studio defaults".
99

10-
1. We use [Allman style](http://en.wikipedia.org/wiki/Indent_style#Allman_style) braces, where each brace begins on a new line. A single line statement block can go without braces but the block must be properly indented on its own line and must not be nested in other statement blocks that use braces (See issue [381](https://github.com/dotnet/corefx/issues/381) for examples).
10+
1. We use [Allman style](http://en.wikipedia.org/wiki/Indent_style#Allman_style) braces, where each brace begins on a new line. A single line statement block can go without braces but the block must be properly indented on its own line and must not be nested in other statement blocks that use braces (See issue [381](https://github.com/dotnet/corefx/issues/381) for examples). One exception is that a `using` statement is permitted to be nested within another `using` statement by starting on the following line at the same indentation level, even if the nested `using` contains a controlled block.
1111
2. We use four spaces of indentation (no tabs).
1212
3. We use `_camelCase` for internal and private fields and use `readonly` where possible. Prefix internal and private instance fields with `_`, static fields with `s_` and thread static fields with `t_`. When used on static fields, `readonly` should come after `static` (e.g. `static readonly` not `readonly static`). Public fields should be used sparingly and should use PascalCasing with no prefix when used.
1313
4. We avoid `this.` unless absolutely necessary.

0 commit comments

Comments
 (0)