Stop code formatting from indenting my comments?

How can I stop code formatting from indenting my comments?

for instance if I have code like the following


void SomeFunc()
{
     call1();
     call2();
     call3();
}


and I want to comment out call2(), using the commenting functions produces something like:

void SomeFunc()
{
     call1();
//     call2();
     call3();
}

But now when I hit format it formats this to:

void SomeFunc()
{
     call1();
    //     call2();
     call3();
}

I do not want this. It makes it hard to read.

There is an option In resharper -> options -> c# -> other -> Don't indent comments started at first column.

I ticked this as I thought this would do what I want. But as far as I can tell it does nothing? In fact, when I duplicate the code from the "After reformat box" into a text editor and runformat document, it reformats it differently.

1 comment

Ok, I did not realise that the resharper formatting and the visual studio formatting were seperate entities. Now that I use resharper formatting life is much better

0

Please sign in to leave a comment.