Roman Ratskey
Roman Ratskey

Reputation: 5259

Line Breaks and Wrapping

In my Resharper options the Right Margin was set to a low value which made my code wrapped into something like this

new Employee {
    Name = "John",
    Id =
        (int)
        EmployeeIDs.John,
    Cost = 8,
    Level = 0,
    Type =
        EmployeeType.Type1
}

However, now as i set the Right Margin "@ Options -> Code Editing -> C# -> Formatting Style -> Line Breaks and Wrapping" to a high value of 300 and reformatted the code i didn't get Resharper to fix the cropped lines for me as i expected the result to be something like this

new Employee {
    Name = "John",
    Id = (int)EmployeeIDs.John,
    Cost = 8,
    Level = 0,
    Type = EmployeeType.Type1
}

How could i get the above desired result ?

Upvotes: 0

Views: 118

Answers (1)

Alexander Kurakin
Alexander Kurakin

Reputation: 13523

Please uncheck following checkbox:

ReSharper | Options | Code Editing | C# | Formatting Style | Line Breaks and Wrapping | Preserve Existing Formatting | Keep existing line breaks

Then start code cleanup once again.

Upvotes: 1

Related Questions