如何强制C#条件指令的缺口? [英] How to force indentation of C# conditional directives?
本文介绍了如何强制C#条件指令的缺口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个选项,如何禁用#如果,#ENDIF等指令不indended后编辑 - >高级 - ?在Visual Studio>格式文档
is there an option how to disable that #if, #endif and other directives are not indended after Edit -> Advanced -> Format document in Visual Studio?
感谢您!
推荐答案
看了StyleCop 。
了StyleCop分析C#源$ C $ C实行一系列的风格和一致性规则。它可以从Visual Studio的内部运行或集成到MSBuild项目。了StyleCop也被集成到许多第三方开发工具。
StyleCop analyzes C# source code to enforce a set of style and consistency rules. It can be run from inside of Visual Studio or integrated into an MSBuild project. StyleCop has also been integrated into many third-party development tools.
您甚至可以添加自定义规则:创建自定义规则微软源分析仪
You can even add custom rules: Creating Custom Rules for Microsoft Source Analyzer
希望它帮助。
这篇关于如何强制C#条件指令的缺口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文