在VS2010中扩展/收缩循环和if/then语句?

chu*_*nce 10 visual-studio-2010

这是我在VS2010中遇到的烦人的问题,无论如何我可以扩展和收缩条件语句和循环,就好像它们是方法一样?我意识到答案可能是我应该将它们重构为方法,如果我达到这一点,但无论如何都要幽默我.我以为我曾经能做到这一点.

编辑,一个例子:

public void DoSomething() 
{
  if (1 < 2) {
  // long statement here
  }
}
Run Code Online (Sandbox Code Playgroud)

在VS2010的左边,我可以收缩"DoSomething"......然而,我不能签约if/then声明.

jbi*_*ing 16

http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/73948b75-2db6-4662-80fa-5f2ace372a3b/

您可以转到"工具"菜单 - >"选项".然后转到文本编辑器 - > C/C++ - >格式化.将Outline Statement Blocks转为true.