|
||||
|
|
Tuesday, October 19, 2004Hiding and Outlining Code: using the #region keyword in .NET
Quick tip: you can put sections of your code inside #region blocks in order to collapse and expand them using .NET Studio's outlining feature. The text after the #region keyword is displayed next to the plus/minus sign, so keep it descriptive.
For example:
would give you two code regions named "database code" and "encryption code". You could then collapse the regions you're not interested so the code view is easier to manage. You can also nest regions:
to gain finer control of what code is shown or hidden. In the above example, you could hide the entire function, or just hide sections of it. Check out MSDN's page on outlining and hiding code to get more information on regions and what menu options are available. Happy outlining! Archives September 2004 October 2004 November 2004 December 2004 January 2005 February 2005 March 2005 April 2005 |
|||
| ||||