ReSharper

ReSharper, or R# as it is commonly known, is a Visual Studio add-in that greatly enhances your productivity as a developer. I have mixed feelings about pushing CodeRush to the "That Was Then..." list in favor of ReSharper, but it is a decision I can't avoid. DevExpress gives free CodeRush licenses to the user group that I run, PhillyNJ.NET, so I definitely love them and their tool, but... right now, I couldn't do without R# at all.
 
A couple of years ago, when I began my switch from VB.NET to C#, I noticed that for a C# "noob" ReSharper was like having an expert there to help me every step of the way. Many of the classic "Pain Points" of switching languages were helped by ReSharper. It gives you back a lot of the things that Visual Studio takes away when you move from VB to C#. C# people hate when I say this, but "it makes working in C# more like working in VB!"
 

 

ALT-ENTER


 
If ReSharper had nothing else, it would be worth the money. You hit ALT-ENTER and it makes you happy. In so many ways! Let's look at some.
 
Have you ever tried to use a type, but you hadn't yet put the "Using" statement at the top of your file? Visual Studio just hates you, and looks at you like this:
 

 

 
Sometimes, especially if you are new, you may not even know what namespace to put up there! But, ReSharper knows, and it offers to help:
 

 

 
When it sees that Visual Studio hates you, if offers to help! You don't have to click anywhere, or hover over it, or anything. It pops up the nice little textbox looking thing, and offers to help. All YOU have to do is hit ALT-ENTER and it takes care of it for you.
 

 

 
What about when you create a new class that is supposed to implement an interface? Again, see here that Visual Studio hates you:
 

 

 
But if you hit ALT-ENTER, you'll see that ReSharper loves you!
 

 

 
Now this isn't completely fair, because there is some key combination that Visual Studio has that will do the same thing, but...it didn't always, and R# has had this for ages. And, dare I say, the R# tool has more options. And it's on the magic ALT-ENTER key just like everything else. That key is addicting.... So you get this dialog:
 

 

 
And then when you press ENTER, you see the result:
 

 

 
It may be worth noting that R# seems to cater more to the TDD crowd. Many of it's features are of particular use to people who write tests before writing code. While I don't yet do that, I do often "use" code that I have not yet written, which means that R# is there to help me. If the next couple of screenshots leave you saying anything other than "OMG I need ReSharper!" then you're doing it wrong:
 
I believe in often using a top-down approach when developing. Meaning that I pretty quickly hack out some code that looks like this:
 

 

 
You wouldn't believe how much R# has helped me just to get to the point you see in the screenshot. I did a lot less typing than you may think. Anyway, Visual Studio hates me now, because there is no such thing as an IRepository, or an IConfigTool, etc. Red Red Red. What happens if I hit the magic ALT-ENTER key on the missing IRepository? See:
 

 

 
So, I click "Create Interface IRepository" and I get one, as expected:
 

 

 
And I'll do that for all the missing interfaces. But, what now? Those interfaces don't have the methods I need them to have. You know what's next, right? Let's ALT-ENTER on the call to GetData()...
 

 

 
R# will add a method to the Interface for me, even with the right signature, given what my broken code (that Visual Studio hates) looks like it wants:
 

 

 
The list goes on and on.. Do yourself a favor, go buy ReSharper!
 

 
Links:
 

 
Enjoy!