In Visual Studio 2015, if you have code like this:
var foo = that.Bar();
selecting Edit β Advanced β Document format leads to formatting as follows:
var foo = that.Bar();
where Visual Studio suggested that two unrelated comments were linked and grouped together. The assumption of the relationship is due to the fact that there are consecutive lines, one of which ends with a comment, and the next starts with one. Of course, this can be circumvented by adding blank lines, but this is not always the best choice depending on the specific code. Please note that Visual Studio 2013 does not have this feature.
I could not find a mention of this feature through an online search. This is C #, and Visual Studio is configured to save tabs.
Is there any way to disable this part of autoformatting?
comments c # indentation text-editor visual-studio-2015
Mark jerde
source share