文本操作将单个文件中的类拆分为多个文件

发布于 2024-08-29 07:25:22 字数 159 浏览 2 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

望她远 2024-09-05 07:25:22

刚刚发布的ReSharper 5.0有项目级的重构。
右键单击该文件,Refactor ->将类型移动到匹配文件中

Just released ReSharper 5.0 have project-level refactorings.
Right click on the file, Refactor -> Move types into matching files

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文