Move Type to Namespace

Relocates a type to a different namespace existing in the current solution and updates all references.

Availability

Available from the context menu or via shortcuts:

  • when the caret is on a type declaration.

Example

namespace TestNamespace
{
    class TestClass
    {

    }
}
Namespace TestNamespace
    Public Class TestClass

    End Class
End Namespace

Result:

namespace MySolution
{
    using TestNamespace;
    class TestClass
    {

    }
}
Namespace MySolution
    Public Class TestClass

    End Class
End Namespace

Screenshot

rsMoveTypeToNamespace

See Also