Datasheet

The editor automatically creates outlining entries for namespaces, classes and their methods, and mod-
ules and their methods. You can also use the
Region statement to group a section of code for outlining.
For example, you can place several related subroutines in a region so you can collapse and expand the
routines as a group.
Figure 1-55 shows more examples of outlining. Line 37 begins a region named
Randomization Functions
that contains three collapsed subroutines. Notice that the corresponding End Region statement includes a
comment giving the region’s name. This is not required but it makes the code easier to understand when
you are looking at the end of a region.
Line 90 contains a collapsed region named
Utility Functions.
Line 96 starts a module named
HelperRoutines that contains one collapsed subroutine.
Finally, Line 109 holds the collapsed
ImageResources namespace.
Notice that the line numbers skip values for any collapsed lines. For example, the
RandomizeIntegerArray subroutine is collapsed on line 39. This subroutine contains 15 lines
(including the
Sub statement), so the next visible line is labeled 54.
Figure 1-55: The code editor outlines namespaces, classes and their methods, modules and their
methods, and regions.
55
IDE
571982 ch01_2.qxd 1/19/06 1:16 PM Page 55