In Visual Studio 2008's Options > Text Editor > C# > Formatting, I have the following settings ticked.
Automatically format completed statement on ;
Automatically format completed block on }
This is really helpful for when I'm writing a method or a for/foreach/while/if statement.
ie if I write
void MyMethod(){}
I want it to reformat it to the following when I type the last }
void MyMethod()
{
}
However, when I write:
bool MyProperty { get; set; }
I want it to stay that way instead of getting changed to:
bool MyProperty
{
get;
set;
}
Is there anyway that I can get this to happen or am I dreaming? The only way I can think of is turning those two settings off....but that just results in the annoyance getting shifted to when I write methods and if statements etc.
Update: Just thought I'd mention that I use Resharper...so if there's a way to accomplish it through there I would be interested in knowing that too.