Make ReSharper respect your preference for code order
Asked Answered
S

2

2

Related to my other question: What's the best way to layout a C# class?

Is there a way in ReSharper to define the order you want your members to be in, so that ReSharper will maintain it?

Shawntashawwal answered 2/3, 2009 at 20:11 Comment(0)
A
5

From this answer:

Check under Type Members Layout in Options (under the C# node). It's not simple, but it is possible to change the layout order.

Appleton answered 2/3, 2009 at 20:14 Comment(0)
G
0

Check File and Type Layout in Resharper's help documentation -

ReSharper can reorder types and type members in C# files according to different patterns. Patterns can describe a lot of conditions and constraints that are evaluated when reordering items in a file and/or wrapping them with specified regions.

The page describes how those patterns work, how to configure them (two options here - use a visual editor or edit the XAML source) and finally, how to apply your settings.

Guaco answered 9/1, 2020 at 12:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.