zoukankan      html  css  js  c++  java
  • VS #region

    1.C# 预处理指令

    #region使您得以在使用Visual Studio代码编辑器的大纲显示功能时指定可展开或折叠的代码块。    #region   name    其中:name      希望给予将出现在   Visual   Studio   代码编辑器中的区域的名称。      备注     必须用   #endregion   指令终止   #region   块。   #region 块不能与 #if 块重叠。但是,可以将 #region 块嵌套在 #if 块内,并且可以将 #if 块嵌套在 #region 块内。   示例   //   preprocessor_region.cs     #region   MyClass   definition     public   class   MyClass       {           public   static   void   Main()             {           }     }     #endregion    我个人比较喜欢这个解释。

    2.VS自动生成的一种特殊的注释格式而已。

    3.vs.net能够把region到endregion之间的代码折叠起来,方便查看。(我也是最近才使用,发现超方便)

    4.隐藏代码,便于管理和查看。

    5.只是一种vs能识别的标识符,便于对代码的阅读。

  • 相关阅读:
    9.过滤器的使用
    8.公共组件
    7.Props向子组件传递数据
    6.组件
    5.指令系统-事件
    4.指令系统
    SpringCloud入门
    springcloud注解
    was unable to refresh its cache! status = Cannot execute request on any known server
    集成第三方框架,报错NoSuchFieldError:logger
  • 原文地址:https://www.cnblogs.com/little-white/p/3467532.html
Copyright © 2011-2022 走看看