Search code examples
visual-studio-2010

Automatically Create a .cs file from a class in Visual Studio 2010


I often code in such way that I put several classes in one cs file to get my code going and then at some point, I want to move every class to a seperate .cs file within my C# project but I have to do this manually by creating a file for every class and cut and paste the class to the new file and then resolve the required namespace one by one for each file. No Fun!

Is there a way to just click right on the class and make visual studio to automatically move the class to a new file under the project tree? I mean, would you please provide such Macro/Snippet(or whatever it is called :) ) and instructions on how to add it to Visual Studio 2010?


Solution

  • I think Resharper has the functionality you want (plus so much more).