[dba-VB] VB.Net 2005 - Regions

Eric Barro ebarro at verizon.net
Fri Jun 15 11:24:16 CDT 2007


John,

I do the same thing so that it's easier to track pieces of code such as for
example events. I usually add a region called "Boneyard" where I move
obsolete code into. Basically code that I don't currently call in the class
but don't want to delete yet.

Eric

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Friday, June 15, 2007 9:03 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net 2005 - Regions

I like regions for organizing classes.  It just works for me to have my
classes organized such that things are in the same places down through the
class.  I set up this regions structure:

#Region "Header"
#Region "Variables"
#End Region

#Region "Constants"
#End Region

#Region "Enums"
#End Region

#Region "Structures"
#End Region

#Region "Events"
#End Region

#Region "Win32API"
#End Region
#End Region

#Region "Properties"
#End Region

#Region "Methods"
#End Region

#Region "Exceptions"
#End Region

Thus I have a header region, with subregions for grouping variables,
constants etc.  Below the header region I have a handful of regions to group
properties, methods and exceptions.  Once I set up my regions, I inserted it
into the snippets so that I could just insert a regions snippet first thing
after I define a blank class.  I can also insert a regions snippet at the
top of the class to "retrofit" an existing class and clean it up.

Comments welcomed.

John W. Colby
Colby Consulting
www.ColbyConsulting.com 

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.17/850 - Release Date: 6/15/2007
11:31 AM
 




More information about the dba-VB mailing list