There are two options you need to change to make the code look the way you want. (Based on Python, I am really worried if the material is not indented after the colon.)
I used the answer of James McNellis and changed it from Smart to Block, although I'm not sure how much this helped.
In the Tools β Options β Text Editor β C/C++ β Formatting β Indentation β Indent Access Specifiers , there is a setting that indentes for access specifiers, but does not indent them.
I also selected "Do nothing" in Tools β Options β Text Editor β C/C++ β Formatting β General β When paste didn't change just by copying / pasting. "
This is not an ideal solution, but at least a little closer.
source share