I like my code formatted like this:
WithDataContext.Execute(
delegate(DataContext dataContext)
{
// code goes here.
});
ReSharper wants to auto-format it like this:
WithDataContext.Execute(
delegate(DataContext dataContext)
{
// code goes here.
});
What options do I need to tweak to get what I want?
ReSharper -> Options -> C# -> Formatting Style -> Braces Layout -> Anonymous method declaration
Set to "At next line (BSD style)"
ReSharper -> Options -> C# -> Formatting Style -> Other -> Align Multiline Constructs
Uncheck "Call Arguments" and you'll get what you're looking for.
There isn't an option to format quite like that that I can find, but take a look at ReSharper|Options: Languages|C#|Formatting Style|Braces Layout. It has a number of options like anonymous type format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With