Is there any way to force resharper to align chained method calls in a specific way
coding-style, resharper, visual-studio
Solution
I think you're looking for the "Chained Method Calls" option under the "Align Multiline Constructs" header here:
Problem
Lets say I have the following code in C# ``` var stringList = GetListOfStrings(); var firstString = stringList.Where(s => true) .Where(s => true) .Where(s => true) .FirstOrDefault(); ``` It doesn't do very much, but it's formatted in the way I like by ReSharper and by Resharpers Code Cleanup feature. Now lets say I rewrite that code to just call the method `GetListOfStrings` without assigning it to a variable first. In this situation Resharper formats it as follows: ``` var firstString = GetListOfStrings() .Where(s => true) .Where(s => true) .Where(s => true) .FirstOrDefault(); ``` Is there anyway to change this so ReSharper formats it as below instead? ``` var firstString = GetListOfStrings().Where(s => true) .Where(s => true) .Where(s => true) .FirstOrDefault(); ``` I'm using the ReSharper 8 Beta and VS 2013 preview if it makes any difference.