Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use ReSharper to arrange members in the same order as implemented interface

Tags:

c#

resharper

Is it possible to use the Type Layout feature of ReSharper to sort the members that implements an interface in the same order as they were declared in the interface?

like image 574
Mikael Sundberg Avatar asked Sep 12 '12 16:09

Mikael Sundberg


1 Answers

No, unfortunately you can't do that directly. But, like Kirill said, you can use the same rules to let them order.

Additionally you can let Resharper group members of an interface into one region by modifying the CodeCleanup profile:

<Group>
    <ImplementsInterface Immediate="true" Region="${ImplementsInterface} Members"/>
</Group>

see also: Resharper Doc

After the automatic grouping and sorting you can adjust the result via the Resharper "File Structure".

like image 138
anscheinbar Avatar answered Nov 14 '22 01:11

anscheinbar