How to use C # #region in Javascript? (Visual Studio 2017)

3

Little use to organize my C # code:

#region Nome
 //seu código
#endregion

How can I do this through javascript and Razor?

@if()
{
  //code javascript
}

Update:

I checked the colleague's reply Cigano Morrison Mendez here and it did not work.

I downloaded and installed Web Essentials 2017 .

And nothing happens:

I'vetried Advanced Javascript Outlining and is not compatible with Visual Studio 2017.

    
asked by anonymous 13.06.2017 / 02:44

1 answer

3

I found the solution for JS:

Note: Only works with JS code. It will not work with Razor .

JavaScript Regions .

AnothersolutionistouseVisualStudioshortcut:

  • Selectyourtextyouwant.
  • Ctrl+MandCtrl+H.

        
    13.06.2017 / 03:49