By Erik Nyberg at September 18, 2009 14:48
Filed Under:
If you spend a lot of time in Visual Studio you really have to download and use CodeRush Xpress (if you haven't already done it). It is a free add in for Visual Studio 2008 from devexpressthat helps you as a developer to code faster and better in many ways. You can download it from here: http://www.devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/ (the installation is very fast and simple).
To get started you probably want to watch their introductory video on their website which explains on how to use the tool. They have other videos as well and I would also suggest that you download and print off this PDF file that contains a lot of the short cuts and templates that you will use a lot.
Here are a few examples of minor ‘CodeRush Xpress for C#’ functions that I use all the time:
1. The help lines
If you have a lot of code with loops, if statements etc then the help lines are very helpful since you can track where everything starts and finish. Look at the red rectangles below and you see that it is a thin line between the brackets.
2. Camel Case Navigation and selection
This allow you to jump between the parts within a camel case name just holding in ALT and pressing left key or right key. If you also hold in shift it select the part of the name.
3. Declare variables
There are many ways of declaring things faster using CodeRush Xpress, here is one of them:
If you have a function like this:
private static string fnSayHello(string name)
return string.Format("Hello {0}", name);
and then you want to call that function by declaring a variable that will hold the result for that function call like this:
var helloPhrase = fnSayHello(name);
If you use CodeRush Xpress to declare your variable instead you can start of by typing the function name and pass in the parameters. Then you just hit the Refactor Keys and select to declare it in the menu that pops out. Then it creates the rest of the code automatically for you. It will not save you great amount of time in this case but since you probably do these type of things a lot it will save you some time in the long run.
There is a lot of great functionality within this add-on so I do recommend you to check out their videos asap and get started if you haven’t done it already.
1a25048a-843e-4f6f-9516-9660943da74a|0|.0