One feature of CodeRush from DevExpress which I use a lot when navigating code is the ability to navigate to a function/method/property implementation from a variable that is of an interface type. I do a lot interface programming (OK OK I get a bit interface happy) and this navigation feature rocks.

The default shortcut keys to bring up the Navigate/Jump To menu is Ctrl + Alt + N. I prefer to bind the Navigate command to Ctrl + E, as it is a bit quicker to type when your fingers are in home position on the keyboard. I show how to update the binding in the screen cast embedded with this blog post.

With the cursor on a function/property of a variable of some interface type, bring up the Jump To menu.

Visual Studio CodeRush Navigate Interface to Implementation

If you pick Implementations from the popup menu, you’ll be taken to the class implementation of the interface function/property. If multiple implementations exist, then a popup menu displaying the various choices will be displayed.

I created a screen cast to show this feature in action:

I’d suggest experimenting with the other Jump To options as well as they come in handy when navigating code.

I hope this helps!

Technical Visual Studio CodeRush August 2, 2010

A CodeRush feature that comes in very handy from time to time is the ability to easily extract and implement interfaces in Visual Studio.

This tip involves using the Refactor command included with CodeRush/Refactor Pro. The default shortcut key is Ctrl + ` .  Personally I prefer to map the Refactor command to Ctrl + R for a more convenient key stroke. I show how to do the mapping in the screen cast embedded later in this blog post.

Extract an interface from a class

You can easily extract interfaces from an existing class. With the cursor on a class, bring up the Refactor menu and select Extract Interface.

Visual Studio CodeRush Extract Interface

This will create an interface that contains the public properties and methods of the class. You can then move the interface to it’s own file by using the Refactor menu once again and select Move Type to File.

CodeRush Move Type To File Interface

Create an interface implementation

You can very quickly create and interface implementation. With the cursor on an interface, bring up the Refactor menu and select Create Implementer. You can choose to create an implicit or explicit implementation.

Visual Studio CodeRush Implement Interface

You can quickly move the implementation to a separate file the same way as shown above for extracting an interface.

I created a screen cast to show this in action:

CodeRush/Refactor Pro is a rock’in Visual Studio add-on from DevExpress.

I hope this helps!

Technical Visual Studio CodeRush August 2, 2010

I created a screen cast to show how to use CodeRush’s SelectionExpand and SelectionReduce commands. This is one of those “I can’t live without” features that I use when editing code. These keyboard commands allow quick selection of blocks of code which speed up your code editing time.

Use it and code on!

Technical Visual Studio CodeRush July 24, 2010