代码之家  ›  专栏  ›  技术社区  ›  hugoware

Visual Studio-改进代码折叠

  •  3
  • hugoware  · 技术社区  · 17 年前

    HTML/ASP源代码编辑器。净

    <% // Search Results Section            <-- Just want folding here
    
       foreach (int item in list) { %>  <-- but it is here also
           Number : <% =item %>
       <% }        
    
       //etc...
    %>
    

    2 回复  |  直到 17 年前
        1
  •  3
  •   Tyler    17 年前

        2
  •  0
  •   Drithyin    17 年前

    我不确定你在这里到底想要什么。 你可以这样做:

    //some code
    #region "my foreach loop"
    foreach(int item in list)
    {
    //so dome work
    }
    #endregion
    //some more code
    

    //some code
    #region "foreach(int item in list)"
    foreach(int item in list)
    {
    //so dome work
    }
    #endregion
    //some more code