#Region ..... #End Region creates a collapsible area. This is particularly useful if there is a description after #Region. When you have more source code in a file than can be displayed on one screen, #Region allows you to hide blocks of code that you do
not want to currently see.
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
Marked as answer by Rex Lin - MSFT on Aug 10, 2007 01:04 AM
abdulmg
Member
8 Points
255 Posts
About #Region
Aug 06, 2007 05:47 AM|LINK
Hi,
#Region
private sub showdata()
End sub
#End Region
Why "#Region" is used, what is the purpose of that.
When it should be used. Can you please explain me the concept of that
Regards
Abdul
rmaiya
Star
11502 Points
1790 Posts
Re: About #Region
Aug 06, 2007 05:58 AM|LINK
#region is used to organize the code. read this link for more info
http://www.knowdotnet.com/articles/classorganizer.html
(MCSD.NET, MCAD.NET, MCDBA)
[Don't forget to click on Mark as answer on the post that helped you ]
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: About #Region
Aug 06, 2007 06:02 AM|LINK
#Region ..... #End Region creates a collapsible area. This is particularly useful if there is a description after #Region. When you have more source code in a file than can be displayed on one screen, #Region allows you to hide blocks of code that you do not want to currently see.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
kaushalparik...
All-Star
26568 Points
3692 Posts
MVP
Re: About #Region
Aug 06, 2007 06:06 AM|LINK
#region lets you specify an Organised block of code that you can expand or collapse when using the outlining feature of the Visual Studio Code Editor.
example:
// preprocessor_region.cs
#region MyClass definition
public class MyClass
{
public static void Main()
{
}
}
#endregion
hope it helps./.
[KaushaL] || BloG || Twitter
Don't forget to click "Mark as Answer" on the post that helped you.