Looking for a class cleaner/formatter plug in for visual studio [closed]
开发者_StackOverflow中文版
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questionLooking for a class cleanup/formatting plug-in for visual studio. Using ReSharper, but looking for something that will allow me to position members. i.e. private members at the top of the class, constructors next etc.
Anyone know of something that offers this?
Cheers
download dxcore and classCleaner and you can format your code anyway you like. if you do decide to customise classcleaner you are likely to get hooked.....
From the looks of it, the StyleCop plugin for ReSharper will do this if you run Code Cleanup. In particular, it has fixes for StyleCop Rule SA1201 specifying ordering.
ReSharper will allow you to control where members are placed in the file during code cleanup.
Take a look at:
ReSharper | Options | Languages | C# | Type Members Layout
http://www.jetbrains.com/resharper/features/screenshots/40/automatic_member_layout_full.png
Deselect Use Default Patterns to enable the textbox beneath. This allows you to specify, in great detail, what should go where.
The downside is that it takes a while to get your head around the notation used in the specification.
I believe this option is only available for C# code.
精彩评论