O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

#Region...#End Region Directive

Syntax

#Region "identifier_string"
' code goes here
#End Region
identifier_string (required; String literal)

The title of the code block (or region)

Description

Marks a block of code as an expandable and collapsible region or code block in the Visual Studio .NET editor

Rules at a Glance

  • Code blocks delineated with the #Region...#End Region directive are collapsed by default.

  • identifier_string serves as the title to identify the region when it is collapsed.

  • Code blocks defined by other directives (such as #If) must be entirely contained within the #Region...#End Region block.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required