【问题标题】:Indentation of nested method calls in Visual Studio 2010Visual Studio 2010 中嵌套方法调用的缩进
【发布时间】:2012-01-07 12:00:35
【问题描述】:

这就是 Visual Studio 2010 格式化三深嵌套方法调用的方式:

Math.Cos(
    Math.Cos(
    Math.Cos(0)));

请注意,这不是最后一次通话。我希望它像这样缩进:

Math.Cos(
    Math.Cos(
        Math.Cos(0)));

有什么方法可以让 VS 像后者那样格式化?

【问题讨论】:

  • 我没有遇到这个问题,但我已经安装了 ReSharper。也许这可能会解决您的问题,我当然会推荐它;)

标签: c# visual-studio methods indentation


【解决方案1】:

不,编辑 + 高级 + 格式化文档命令不会触及该代码。这就是您按下 Enter 键时得到的结果。只需在第 3 行键入 Tab。

【讨论】:

  • 嗯,好的。我担心 VS 在自动格式化时会撤消手动缩进。谢谢!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-09-07
  • 1970-01-01
  • 1970-01-01
  • 2011-09-10
  • 2013-12-13
  • 1970-01-01
相关资源
最近更新 更多