Visual studio - is there a way to select multiple files and wrap a namespace around each one?

Is there a way to select all classes in a folder and assign a namespace to each one in visual studio?

If there is no tool for that, is there a regex pattern that will match everything before the class declaration, but after the import?

+1


source to share


1 answer


Resharper has a feature to change namespaces for files.

For a manual solution, you can:



  • close all files in your solution
  • open only those files that need their namespace.
  • search and replace for namespace old

    beforenamespace new

+2


source







All Articles