C# 组织我的代码
是否存在任何工具(VS 扩展,或者 Resharper 支持此...) 哪个可以以某种指定的方式组织我的类中的代码?像这样:
public static fields/properties
private static fields/properties
public fields/properties
private fields/properties
constructors
public static methods
private static methods
public methods
private methods
等等
(所有内容都按字母顺序排序)
那就太好了...
我喜欢让我的代码非常有组织,但有时我不遵循自己的规则,而不是手动重新组织所有内容可能会有点问题)
does any tool (VS extension, or maybe Resharper supports this...) exist
which can orginize code in my class in some specified way? Like this :
public static fields/properties
private static fields/properties
public fields/properties
private fields/properties
constructors
public static methods
private static methods
public methods
private methods
etc
(and all are sorted alphabetically)
It would be so nice...
I like to have my code very organized, but sometimes I do not follow my own rules and than reorganizing everything by hands may be a little bit problematic )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,ReSharper 可以做到。您甚至可以自定义它组织项目的方式...看看 Hadi Hariri 的这篇博客文章 http://hadihariri.com/2011/01/04/in-depth-look-at-customizing-type-layout-with-resharper/
Yes, ReSharper can do it. You can even customize the way it organizes items... take a look at this blog post by Hadi Hariri http://hadihariri.com/2011/01/04/in-depth-look-at-customizing-type-layout-with-resharper/
是的,resharper 具有这样的功能(以及许多其他同样出色的功能)。
Yes, resharper has such a feature (and many other equally marvelous ones).
Telerik 的 JustCode 也具有此功能。代码排序规则可以通过“选项”对话框轻松自定义 - 无 XML。
Telerik's JustCode has this feature as well. Code ordering rules are easily customizable through the Options dialog - No XML.