Freezing part of the code from formatting

Is there a way to block or freeze part of the code for formatting in Visual Studio?

I want to protect the following code:

Method("This is a long text", 12 , true ); Method("Hi", 558, true ); Method("Short text", 1 , false ); 

for formatting:

 Method("This is a long text", 12, true); Method("Hi", 558, true); Method("Short text", 1, false); 

but you can still format the rest of the document.

+7
source share
2 answers

You can completely disable it ( Options->TextEditor->Basic->General ) uncheck the Pretty list box. And in Options->Text Editor->C#->Formatting options are disabled.

But, unfortunately, there is no built-in option to selectively prevent the formatting of part of the code.

0
source

ReSharper style is the key to your problem.

0
source

All Articles