当使用 DevExpress Refactor Pro 对 using 语句进行排序时,我可以使所有系统名称空间都位于顶部吗?

发布于 2024-08-19 20:16:29 字数 61 浏览 3 评论 0原文

我希望所有系统 using 都位于顶部(按字母顺序排序),然后是所有其他 using 语句(按字母顺序排序)

i want all of the system usings at the top (sorted alphabetically) and then all other using statements afterwards (sorted alphabetically)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

遥远的她 2024-08-26 20:16:29

您可以让 Refactor Pro 按照您的方式进行。
打开“DevExpress -> 选项 -> 编辑器 -> 重构 -> 优化命名空间引用”,根据自己的喜好设置相关选项。

优化命名空间参考文献

You can make Refactor Pro to do it your way.
Open "DevExpress -> Options -> Editor -> Refactoring -> Optimize Namespace References" and set relevant options according to your preferences.

Optimize Namespace References

趁微风不噪 2024-08-26 20:16:29

不了解 RefactorPro,但由于问题标记为“visual-studio-2008”,因此您可以在 VS'08 中通过转到“工具”->“Visual Studio 2008”来完成此操作。选项->文本编辑器 -> C#(或任何相关的)->高级,然后勾选“对用途进行排序时首先放置‘系统’指令”。

Don't know about RefactorPro, but since the question is tagged with "visual-studio-2008", you can do it in VS'08 by going to Tools -> Options -> Text Editor -> C# (or whatever is relevant) -> Advanced and then ticking "Place 'System' directives first when sorting usings".

尬尬 2024-08-26 20:16:29

RefactorPro / CodeRush 都有重构......

  • 优化命名空间(删除未使用的命名空间)
  • 按字母顺序排序
  • 按长度排序

此外还有(第 3 方)插件以许多其他方式排序。

例如:Refactor_SortNamespacesByScope

此外,虽然提问者不要求这样做,但这些产品VS2005也可以工作。

RefactorPro / CodeRush both have refactorings to....

  • Optimize namespaces (remove unused namespaces)
  • Sort Alphabetically
  • Sort by length

Additionally there are (3rd party) plugins that sort in many other ways.

For example: Refactor_SortNamespacesByScope

Additionally, although the asker does not require this, these products also work VS2005.

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