开发者

Separating C# classes into individual files

I'm looking for a tool which will split a file containing multiple C# classes, so that each class is i开发者_Python百科n its own file. Does such a tool exist?


In case you are a Resharper (or DevExpress IDE Productivity Tools) user, it has a refactoring that does this. Not sure whether you can have it process the full file as one command, but it's just a couple of keyboard strokes per class, so it can be done manually (unless we are talking hundreds of classes).


Resharper does this. CodeRush also does this. CodeRush also gives you options to rename the file to match the type, etc.


Why not cut and paste the classes? Resharper and other tools (possibly even vs2010) can do a Refactor...Move Class, but it that would probably take longer than:

  • Create new file
  • Cut class from original file
  • Paste to new file
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜