What is the usage of region in c#?
Give Examples about the Subject ,Please.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jun 13, 2014, 10:06 AM
What I meant is that you need to see it in action in Visual Studio to appreciate what it does. Just reading about it in a book or online is not enough.
Joe WilsonPosted Jun 13, 2014, 8:08 AM
Joe WilsonPosted Jun 13, 2014, 8:05 AM
Joe WilsonPosted Jun 13, 2014, 8:03 AM
Bhabani PrasadPosted May 26, 2014, 8:07 AM
VulpesPosted May 26, 2014, 7:24 AM
You have to use it in Visual Studio to see how it enables you to collapse or expand a piece of code.
This is particularly useful when you want to avoid accidentally editing a piece of code which has been generated by the Visual Studio designer.
If you look at Form1.Designer.cs in a Windows Forms application, you'll see that the InitializeComponent() method has been collapsed in this way.
Joe WilsonPosted May 24, 2014, 1:11 PM
Could you please explain region completely yourself?
Joe WilsonPosted May 24, 2014, 1:10 PM
Could you please explain region completely yourself?
Joe WilsonPosted May 24, 2014, 1:10 PM
Could you please explain region completely yourself?
Lakshmanan Sethu SankaranarayanPosted Apr 30, 2014, 12:53 AM
Joe WilsonPosted Apr 30, 2014, 12:45 AM
Joe WilsonPosted Apr 30, 2014, 12:43 AM
Abhay ShankerPosted Apr 29, 2014, 11:00 AM
Regions are created in this format:
#region MyRegion
your code here
#endregion
you can also check below url for detail
http://msdn.microsoft.com/en-us/library/9a1ybwek.aspx
VulpesPosted Apr 29, 2014, 8:44 AM
http://msdn.microsoft.com/en-us/library/9a1ybwek.aspx
Kunal VaishyaPosted Apr 29, 2014, 8:32 AM
Example like this
#region Page Events
//do your code
#endregion
#region Controls Events
//do your code
#endregion
#region Utility
//do your code
#endregion
#region Procedures
//do your code
#endregion