I’ve recently started using CodeRush with Visual Studio 2010 and am so far very impressed with the convenience it adds to coding. One thing that is very clear is that the creators of CodeRush are real programmers and look very hard for patterns that us developers are constantly doing. As I run into these things that get my attention, I plan on blogging them. Some are just earth shattering, and others, just nice to have. This particular one is a nice to have.
So, say you have code like this:
var sessionAttendeeOds =
new SessionAttendeeODS();
listSessionAttendees =
sessionAttendeeOds.GetByUsername(Context.User.Identity.Name);
When I chose “InlineTemp”, the code changes to the following, make it easier to read.
listSessionAttendees =
new SessionAttendeeODS().GetByUsername(Context.User.Identity.Name);
Again, this is not a huge deal, but small fixes like this will add up over time and make my code cleaner and more readable. CodeRush makes it so easy that I’m sure I’ll do this kind of thing more and more.
HTH’s.