Using hastag Region in VB

Using hastag Region in VB


Using Region in VB will help you categorize your code.  Is part of the greatest functionalities of this software to group or explode you code simply by pressing the plus or the minus sign. If you want to work with notepad like many, surely you won’t be efficient.

Basically, a region could be placed in any class like this example:


Public Class Form1


#Region "members"

#End Region
#Region "Properties"

#End Region
#Region "Load and Contructor"
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

    End Sub
#End Region
#Region "Methods"

#End Region

#Region "my Threads"

#End Region
#Region "Regular Controls Events"

#End Region

End Class




Fell free to regroup you stuff the way you like it. But generally, people regroup member in one place and methods in a other place. Is very simple as long you respect the following format:


#Region "members"

#End Region


You could anything you want between the quotes.

Use the CTRL+M and then the CTRL+L to quickly minimize all your code. This is extremely time saving.


Reference :

The program I bought for this article: Visual Studio 2010 Professional (Old Version)
A newer version for Visual Basic : Microsoft Visual Studio Pro 2012
Check Technologies Officiel Web Site : http://checktechno.ca



0 Response to "Using hastag Region in VB"

Posting Komentar