简体   繁体   English

如何更改 Visual Studio 折叠功能

[英]How to change visual studio collapsed functions

I have rummaged through settings but didn't find anything relevant, so is there an option to change visuals of collapsed functions in visual studio c# editor to look more like vb?我翻遍了设置,但没有找到任何相关的东西,那么是否有一个选项可以将 Visual Studio C# 编辑器中折叠函数的视觉效果更改为更像 vb?

As seen in c#:如在 C# 中看到的:C#

Want it to be more like:希望它更像:VB

No, you can not achieve that in C# text editor, because only the part within curly braces { } is grayed out, not function name.不,你不能在 C# 文本编辑器中实现,因为只有花括号 { } 内的部分是灰色的,而不是函数名称。
Still you can play with fonts and colors - follow this link您仍然可以使用字体和颜色 - 按照此链接

you have nothing to change, they use what we call a region , instead of closing your methods, you can use the region as shown below你没有什么可改变的,他们使用我们所说的区域,而不是关闭你的方法,你可以使用如下所示的区域

#region MyClass definition  
public class MyClass   
{  
   static void Main()   
  {   
  }  
}  
#endregion  

How To Use Region In Visual Studio / Microsoft DOC 如何在 Visual Studio / Microsoft DOC 中使用区域

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM