Lasse V. Karlsen
Lasse V. Karlsen

Reputation: 391336

ReSharper configuration for indentation of anonymous methods?

If I ask ReSharper to reformat the current code:

SomeMethodThatIsGivenAnAnonymousMethod(delegate
{
    Test();
});

Then it reformats it like this:

SomeMethodThatIsGivenAnAnonymousMethod(delegate
                                           {
                                               Test();
                                           });

I can at most coax it to line up the braces with the delegate keyword. Is there any way I can coax it into indenting it back to the original way?

Upvotes: 16

Views: 1139

Answers (1)

Dan Bryant
Dan Bryant

Reputation: 27495

Try Formatting Style | Other | Indent Anonymous Method Body. If I turn this off, I get the original format you describe.

Upvotes: 22

Related Questions