4

I have a non-nested class WillBeNestedClass and another class NestBox.
Now I want to move class WillBeNestedClass into class NestBox as a nested class. So WillBeNestedClass will be nested in class NestBox.

Is there a refactoring in VS or ReSharper that can do that moving and that automatically updates all references to nested class (from WillBeNestedClass to NestBox.WillBeNestedClass)?

Pang
  • 9,564
  • 146
  • 81
  • 122
thersch
  • 1,316
  • 12
  • 19

1 Answers1

4

As far as I'm aware, there is no such quick-action or refactoring available in ReSharper by default. Maybe there is some plugin that allows this - or you could try and create your own. I'm sure it'd be appreciated by more developers.

Available out of the box are:

  • Move to folder
  • Move to namespace
  • Move to separate file

I did, as you, attempt to use Move to namespace and input a type but that dog wouldn't fly.

Pang
  • 9,564
  • 146
  • 81
  • 122
J. Steen
  • 15,470
  • 15
  • 56
  • 63