Automatically change the namespace when changing the folder file

Posted on

Question :

I need to restructure the folders of a project, but there are many files and their namespaces need to be changed.

Is there any way to automatically change the namespace when moving a .cs file from one folder to another?


Answer :

One way to do this in Visual Studio without external help is to do a simple find and replace , press the CTRL + Shift + H , will open the window shown below, now just replace namespace .


Leave a Reply

Your email address will not be published. Required fields are marked *