I have been looking at the ReSharper Code Cleanup rules and I seem to have changed how it formats conditional operators and have no idea how to change it back to how it worked before I edited my settings.
What is different is how far it indents the two elements of the conditional operator. Before it used a standard tab indent (ie 4 spaces) but now it is indenting the conditional lines much further in.
This is how I want the Code Cleanup to format my conditional operator:
var customerDetails = new CustomerDetails
{
OrderNo = orderNo,
Name = user.UseSalutation
--> ? user.Salutation + " " + user.Surname
--> : user.Forename,
Email = user.Email
};
But this is what ReSharper is doing now:
var customerDetails = new CustomerDetails
{
OrderNo = orderNo,
Name = user.UseSalutation
---------> ? user.Salutation + " " + user.Surname
---------> : user.Forename,
Email = user.Email
};
What setting do I need to change to tell ReSharper I only want conditional operators to be indented one tab stop?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.