If you heavily use region directives in CSharp, Visual Basic, or C++, the following CodeRush features may help you to make it easier to work with them:
Creating regions:
Auto Declare allows you to quickly declare a variable (field, local or parameter) based on its type. To apply Auto Declare, type the class name and press the Ctrl+A shortcut. The variable will be declared with an appropriate name, and an action hint will be shown:

Read more…
The Move to Region (also known as Member Mover) CodeRush feature extends the Member drop down menu with a menu item that allows you to move the active member to a region according to your preference:

Read more…
When the editor caret is on the line with a region directive, you can press the Space key to collapse or expand the outline of a region. There are built-in shortcuts for toggling outline expansion, but they are probably more tricky to press and remember, e.g. “Ctrl+M, M” (hold the Control key and press the M key twice in the Visual C# keyboard mapping scheme).

Read more…
If you prefer your code to be wrapped into region directives (#region … #endregion in CSharp, or #Region … #End Region in Visual Basic), the Auto Create Region feature from CodeRush will help. To create a named region around a method, property or event, press “Ctrl+3” key anywhere inside of an active member. This will execute the “RegionAutoCreate” action, which wraps the active member into region directives. The region name will be the same as member’s name and will wrap all attached elements, such as XML doc comments or attributes as well.
Read more…
The Scope (Visibility) Cycle feature adds the capability to quickly change the visibility modifier of the active member using a single shortcut. In a source code file, if your text caret is anywhere within or on a member (method, function, property, class, etc) definition, you can use the Alt key with the Up and Down arrow keys, to cycle through the legal visibility modifiers:
Read more…
Smart Enter is intended to improve the usability of the Enter key while coding in the editor. If the feature is enabled and the Enter key is pressed, it moves the editor text caret to the next code line (starting it with the same amount of white space on the current line and adding a line statement terminator to the end of the current line if it doesn’t exist (.e.g semi-colon in CSharp) or inside of a code block, leaving the characters to the right of the source caret location at their initial position. It is activated if the character to the right of the current caret position is one of the following:
- ] (closing bracket)
- ) (closing paren)
- > (closing angle bracket)
- ; (semi-colon)
Read more…
This command reduces the selection using the same logical blocks by which it was last increased via the Selection Increase feature. If you accidentally overshoot the block you want to select, you can reduce the selection using NUM- key or CTRL+Shift+W keys.
—–
Products: CodeRush Pro and CodeRush Xpress
Versions: all
VS IDEs: any
Updated: Aug/16/2010
ID: C015