Tag: indentation

使用使用空格的字符串文字保持代码结构

所以有点奇怪的问题我无法提出搜索条件。 如果我的程序中有多行字符串文字,那么无论如何都要保持代码缩进的一致性,而不会在字符串文字中添加不需要的空格? 例如: if (true) { if (!false) { //Some indented code; stringLiteral = string.format( @”This is a really long string literal I don’t want it to have whitespace at the beginning of each line, so I have to break the indentation of my program I also have vars here {0} {1} {2}”, var1, var2, […]

有没有办法强制使用制表符而不是空格?

StyleCop提供检查空间的一致使用,但遗憾的是缺乏相反的想法:强制源代码使用选项卡。 有没有办法添加此function? 它不一定是StyleCop,也欢迎其他工具。