我已经查看并搜索了在安装了 Resharper 9.0.0.0 的 Visual Studio 2015 中保存 C# 文件时禁用注释缩进的方法。
我想在开始编写实际代码之前进行伪代码。但是,我一直在调整 Visual Studio 和 Resharper 的设置,但都无济于事。因此,例如我希望评论看起来像:
private string ToggleString(string input)
{
// If input.length is between 1-100
// All the uppercase letters converted to lowercase.
// All the lowercase letters converted to uppercase
// else
// Return a constructive message.
return input;
}
当我保存 CTRL + s 结果是这样的:
private string ToggleString(string input)
{
// If input.length is between 1-100
// All the uppercase letters converted to lowercase.
// All the lowercase letters converted to uppercase
// else
// Return a constructive message.
return input;
}
如何禁用自动格式?
最佳答案
在 VS 2017 (C++) 中有一个复选框。
工具 |选项 |文本编辑器 | C/C++ |格式化 |缩进 |保留评论的缩进
取消选中它修复了烦人的评论自动格式化。 也许 VS 2015 中存在相同的选项。
关于c# - 使用 Visual Studio 2015 禁用注释的自动缩进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43899505/