Make ReSharper respect your preference for code order

后端 未结 2 1311
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-14 21:18

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 ReSh

相关标签:
2条回答
  • 2021-01-14 21:37

    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.

    0 讨论(0)
  • 2021-01-14 21:54

    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.

    0 讨论(0)
提交回复
热议问题