I posted last week about how to get my employer to
purchase a license for ReSharper. Yex called me on it and wanted
some explanations why I liked it or didn't like it. Sean
Chase has some and here are some of my own. There is still
more things to ReSharper than what I'm posting about here. But, I can say
that after using it for a month these are the key things that I use
daily. I hope some of this is helpful and useful. Sorry
it's a long post but this was put together over a few days when I didn't
really have time to put it together for a blog post. So I did a
little at a time on the side until I could get it all together and
posted. The text in blue are things that I consider time savers and help me be more
productive.
Syntax Highlighting: Adds highlighting
for fields, local variables, types, and more:
 You can configure highlighting settings in the standard
VS.NET highlighting setup.
Highlights variables that are never used. This is very handy when
working on "group" code when you're not sure if removing a variable will
blow anything up. Cleaner
code.

Bracket Matching: You notice that the brackets for the foreach
block are highlighted. That happens for each code block whether it's a
foreach loop or an if statement. This is helpful
for nested parentheses too since it can get confusing at
times. As you move to a parenthesis its matching parenthesis
is highlighted. Also in this screenie is a an example where the beginning
of the foreach loop is outside of the code window. The cool little tool
tip pops up...I like that!

Code Refactoring:
Renaming:
Using the
ReSharper rename will automatically correct all references to that item in
the code. It's not just a text match.
If you rename a Namespace all
Namespaces, Using directives, and qualified names of types are renamed. If
you rename a Type all Using directives, and qualified names of types are
renamed. If you rename a Method all calls to the
method and overridings/implementations of the method in subclasses are
renamed. There have been times where I've not renamed a
method because I didn't want to track down all of the uses and possibly
miss one. If you rename a field all uses of the field (both read and
write) are renamed.
Encapsulate Field: If you've ever spent time creating a class
that has more than a few properties you know who much of a beating it can
be just to type everything. Here, you type the field and then
right-click& bam! Less time typing
getters and setters. Or if you choose convert your current
properties to a pair of Get/Set methods.
Convert Property to Method:
Code Analysis bar (not official name but what I call it). It's a
handy vertical bar on the right-hand side of the code window. At the top
it's green if good, orange if there are warnings, and red if there are
errors. What dictates a warning/error is configurable too. As you move
down the vertical bar there is a smaller indicator where the warning
or/error is. Hover over it and it gives you the message. Less time attempting to
compile/recompile.
Auto complete: This another favorite of mine. A simple Alt-Enter
puts the needed using statement for me at the top of the code. The second
screenie shows where I just typed in "Sql" and pressed ctl-alt-space and
it gave me a full list...notice that the System.Data.SqlClient using
statement is not at the top, yet I can still select that class. No more searching for the right namespace if I know the
beginning of the class name. When I select the class it will insert
the using statement too.
Code Reformatting:
I'll be honest, this good enough for me to almost spend the $150 of my
own money (may have to anyway). In the ReSharper options I can design my
own coding style standards and with a simple right-click ReSharper will
reformat my code (highlighted section, class file, or complete project) to
the settings I picked. I've heard that a good use could
be where a company can come up with their own coding
style/standards and each developer and still code how it works for them.
When the code is ready for check-in just reformat the code to the company
settings. Either way I like having it look over my shoulder for me to keep
up a personal standard. Saves me time in not having
to re-review my own code for the standards and provides cleaner
code.

|