views:

54

answers:

1

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

If there is no tool to do it, is there a regex pattern that will match everything before the class declatarion, but after the imports?

+1  A: 

Resharper has a feature of changing namespaces for files.

For a manual solution, you could:

  • close all files in your solution
  • open only those files who need their namespace changed
  • perform a find-and-replace for namespace old to namespace new
p.campbell