Reporter | Damian Powell (damianpowell) |
---|---|
Created | Jan 16, 2012 4:06:01 PM |
Updated | Jan 16, 2012 4:06:01 PM |
Priority | Normal |
Type | Unspecified |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Unassigned |
Subsystem | No subsystem |
Affected versions | No Affected versions |
Fixed in build | No Fixed in build |
I often user Surround With Region to hide Fields and ctors in my C# classes. I also align member variable declarations and parameters like so:
If I select the fields and constructor and use "Surround With #region" to hide them in a region block, the code is reformatted as shown below. Other 'Surround With' commands (including '#if..#endif') do not reformat the code.
Correctly Formatted
public class Foo { private readonly int bar; private readonly string baz; private readonly SomeOtherClass quux; public Foo(int bar, string baz, SomeOtherClass quux) { this.bar = bar; this.baz = baz; this.quux = quux; } }
If I select the fields and constructor and use "Surround With #region" to hide them in a region block, the code is reformatted as shown below. Other 'Surround With' commands (including '#if..#endif') do not reformat the code.
Incorrectly Formatted
public class Foo { #region Fields & ctors private readonly int bar; private readonly string baz; private readonly SomeOtherClass quux; public Foo(int bar, string baz, SomeOtherClass quux) { this.bar = bar; this.baz = baz; this.quux = quux; } #endregion }