Move classes into separate files in one go

Skip to end of metadata
Go to start of metadata

You have probably seen that ReSharper offers you the option to move a type into a corresponding file. But did you know that you can move several types into correspondingly named files in one go? For example, say you have a single file with the types Apple, Orange and Plum, defined as follows:

What I can do to separate these is right-click the project in the Solution Explorer and go to Refactor | Move Types Into Matching Files:

ReSharper then asks which elements should be moved into separate files:

Once you press next, the types will be separated into correspondingly named files:

  • No labels