This seems like it should be really simple to do but I just can't figure it out. I want to allow Visual Studio to keep auto formatting my code as it is, except for this part:
public SomeClass : BaseClass {
public SomeClass()
: base()
{
}
}
Why can't I have it look like this instead:
public SomeClass : BaseClass {
public SomeClass() : base() {
}
}
I looked through Tools -> Options -> Text Editor -> C# -> New Lines and can't find it. Is there a way I can change it to allow auto formatting and my second example?
The solution was to go to 'Tools > Options > Text Editor > Basic > VB Specific' and turn 'Pretty Listing' OFF.
AFAIK there is no way to prevent Visual Studio from doing this.
Are you sure that unchecking:
Options -> Text Editor -> C# -> Formatting -> New Lines -> Place Open Brace on new line for types
doesn't do what you want?
and also uncheck
Place open brace on newline for methods.
(nvrmind.. I see what you are getting at... It is annoying)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With