My classes are formatted like this automatically in Visual Studio.
[Serializable]
public class TestException : Exception {
public TestException()
: base() {
}
}
I do not want that line break to happen between constructor and base constructor call, so it should look like this.
[Serializable]
public class TestException : Exception {
public TestException() : base() {
}
}
What settings would I have to change in order to achieve my expected result?
Unfortunately there is no such setting in the Visual Studio's built-in Options\Text Editor\C#\Formatting\New Lines
dialog.
If you use ReSharper there is a Place constructor initializer on same line
option under Code Editing\C#\Formatting Style\Line Breaks and Wrapping
:
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