I’m constantly amazed by the insightfulness of ReSharper’s suggested refactorings (ReSharper is a Visual Studio Addin from JetBrains I use with C#). Today, I’ve been working on a threading problem where I’m getting crashes based on what seems like not proper locking across threads (they usually show up as some type of ugly update object or enum error).
My code starts like this:
public static List<DbProgressReport> DbProgressReportProperty { get; set; }
(more…)
For the last few days, I’ve been using DevExpress CodeRush and am finding some very useful refactorings. Many I’m not blogging about, but there are a few that I really like. In this post, I’m going to show just two of those refactorings that have been making my code much nicer and easier to write. One is the “Introduce Using” refactoring, and the other is “Convert to Lambda Expression”.
Before I go into the details, I’d just like to disclose that when I was first writing the Silicon Valley Code Camp web site, I was an asp.net and c# newby. I’m not claiming wizard status now, but I have to admit that when I go back and look at some of the code I wrote back then (including what I’m showing below before the refactoring), it’s a little embarrassing. Silicon Valley Code Camp for me as “when I’m not doing real work” web site so I don’t really have the time to go back and clean things up. Now, with CodeRush, it’s easy to clean things up when I see them with very little effort.
(more…)