Using #Region to structure code
Posted by on November 03, 2008 12:08
One of the best things came in .Net for developer is #Region. #Region lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio Code Editor.
During my development I found we can have our code divided into following blocks.
- Constants
- Shared Region
- Private Fields
- Properties
- Private
- Protected
- Internal
- Public
- Methods
- Private
- Protected
- Internal
- Public
- (In DNN Modules)
- IModuleAction implementation.
- IModuleListner implementation.
- IModuleCommunicator implementation.
- Private Fileds
- Properties
- Private
- Protected
- Internal
- Public
- Methods
- Private
- Protected
- Internal
- Public
- Event Handlers