文本操作将单个文件中的类拆分为多个文件
我使用 XSD.EXE 从 XSD 架构生成 C# 文件。不幸的是,这个工具将所有类提取到一个 allClasses.cs 文件中。
有没有人有一个好的技术(或工具),可以将 allClasses.cs 文件中的每个类提取到各自的文件中,例如 ClassA.cs、ClassB.cs 等?
I used XSD.EXE to to generate a C# files from an XSD schema. Unfortunately, this tool extracts all the classes into a single allClasses.cs file.
Has anyone got a good technique(or tool) that will extract each of the classes in the allClasses.cs file into their own respective file e.g. ClassA.cs, ClassB.cs, etc. ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
刚刚发布的ReSharper 5.0有项目级的重构。
右键单击该文件,Refactor ->将类型移动到匹配文件中
Just released ReSharper 5.0 have project-level refactorings.
Right click on the file, Refactor -> Move types into matching files
您可以使用 re-sharper 来分隔类
https://stackoverflow.com/questions/169310/is-using-resharper-a-time-saver
You can use re-sharper to separate the classes
https://stackoverflow.com/questions/169310/is-using-resharper-a-time-saver