Rename Namespace to Match Folder Structure

Renames the namespace to match the folder containing the current file.

Availability

Available from the context menu or using shortcuts:

  • when the caret is on a namespace declaration and the file is located in a folder whose name differs from the namespace name.

Example

namespace MyApplication.Core
{
}
Namespace MyApplication.Core
End Namespace