Domanda

I know this is a fairly small detail, but for some reason it's incredibly annoying to me and I cannot figure out how to correct it (I've looked at the "Line Breaks and Wrapping" options).

Here's how I like this code formatted:

var reps = ctx.Commissions
    .GroupBy(x => x.SalesRep)
    .Select(x => new
                {
                    x.Key.UserID,
                    Name = x.Key.FirstName + " " + x.Key.LastName
                })
    .ToList();

ReSharper, though, likes to format it as

var reps = ctx.Commissions
    .GroupBy(x => x.SalesRep)
    .Select(
            x => new
                {
                        x.Key.UserID,
                        Name = x.Key.FirstName + " " + x.Key.LastName
                })
    .ToList();

Any ideas as to how I can stop ReSharper from doing this?

Thank you,

Andrew

È stato utile?

Soluzione

It looks like you should disable Prefer wrap after '(' in invocation option in Code Editing -> C# -> Formatting Style -> Line Breaks and Wrapping section.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top