What is #Region Block in Dot Net?

 Posted by vishalneeraj-24503 on 9/15/2014 | Category: .NET Framework Interview questions | Views: 1882 | Points: 40

#Region Block lets us specify a block of code that we can expand or collapse when using the outlining feature of the Visual Studio Code Editor.

If the code is longer or bigger,then it is convenient to be able to collapse or hide one or more regions so that you can focus on the part of the file that you are currently working on.
In other words,we can say that The #Region directive partitions your code.With #region,we can organize code into blocks that can be expanded or collapsed visually.
We must indicate the start of the region and the end of the region.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response