My Enthusiasm for Resharper Amplified

I’ve posted and tweeted often over the years when I find an exciting new feature in JetBrains Resharper.  Looks like they have heard me as I’m front and center on their main page now.   … Continue Reading

Why ReSharper Is Worth Using (reason #879)

  I often email the folks at JetBrains (the makers of ReSharper) letting them know that one of their refactors is wrong.  They often email me back letting me know my about my misunderstanding.  I actually enjoy this. Today, was a perfect example but I did not get past the ReSharper feedback form when I realized my code was wrong (sadly missed the exchange with them).  I’m busy writing the SEO save for Silicon Valley Code Camp’s new web site (coming by next week hopefully).  In this case, I’m looking for a trackId passed into the sessions.aspx page. If I find it, then I redirect to a more friendly URL. Here is my code I was going to complain to ReSharper about as incorrectly warning me that my trackId = –1; is … Continue Reading

A Quick Thank you and At-A-Program For Resharper and Refactoring

I had the following line embedded in an initializer: EmailAlerts = String.IsNullOrEmpty(emailAlerts) ? false : emailAlerts.ToLower().Equals("true"), Resharper says (“Simplify conditional operator”)     I say sure, ReSharper does EmailAlerts = !String.IsNullOrEmpty(emailAlerts) && emailAlerts.ToLower().Equals("true"), Clean, Elegant.  I’ve had some posts like this criticized in the past with comments like “Well, if you can’t do that on your own you shouldn’t be programming”.  My reply: “I could have, I didn’t, It did, and I like it better.   That’s it for now. … Continue Reading

LINQ and “Possible Multiple Enumerations of IEnumerable” Warning / Resharper To the Rescue!

In the most recent version of Resharper 7 from JetBrains, the brilliant team has gone one step above and beyond.  Not only do they show this error which can be quite tricky to both understand and fix, but they now go one step further and offer a fix. For example, look at the below code: var emailDetailInfos = new List<EmailDetailInfo>();using (var db = new SiteDB()){ foreach (var emailDetailId in emailDetailIds) { // first get details about this particular email var emailDetail = db.EmailDetails.FirstOrDefault(a => a.Id == emailDetailId); if (emailDetail != null) { // get all the Details associated including the htmlbody if there is one (that is, images and body) var details = (from ed in … Continue Reading


Get every new post delivered to your Inbox

Join other followers: