Product Reviews

C# Refactory

Here's a way to recode objects in many ways without losing your place.

Refactoring is the process of rearranging code in a disciplined way. The goal of refactoring is to go from messy code to clean code, with all of the advantages in understandability that that implies (for more information, see Martin Fowler's excellent book on the subject or his Web site

Of course, where there's a technique there's a tool. C# Refactory is a tool designed to help you refactor C# code in the .NET interface by simply selecting menu choices and filling in simple dialogs. In its first incarnation, C# Refactory supports these refactorings:

  • Extract Method
  • Extract Superclass
  • Extract Interface
  • Copy Class
  • Rename Parameter
  • Raname Local Variable
  • Rename Member
  • Rename Type

Take "Extract Interface," for example. After a development session you might realize that you've got some functionality that needs to be generalized and then reimplemented in several different ways. With the Extract Interface refactoring, you just supply a name for the new interface and specify which methods of the existing class should come from the interface. C# Refactory builds the interface definition and modifies the class to implement the interface, without any manual intervention.

In addition, C# Refactory supplies a set of metrics (lines of code, cyclomatic complexity, lines of comments, and so on) that can be calculated on any level from solution on down. If your development process is at all driven by this sort of number, you'll find this useful.

I was impressed at how easy to use this product was after installation. Though the initial catalog of refactorings is fairly small, they seem to have thought hard about what would be useful. And they're improving fast; indeed, while I was editing this review, a new version with one more refactoring was available for download to my computer. If you're working on a large object-oriented C# project, you'll find a home for this in your tool kit.

About the Author

Mike Gunderloy, MCSE, MCSD, MCDBA, is a former MCP columnist and the author of numerous development books.


  • Google IDs on Azure Active Directory B2B Service Now at 'General Availability'

    Microsoft announced on Wednesday that users of the Google identity and access service can use their personal log-in IDs with the Azure Active Directory B2B service to access resources as "guests."

  • Top 4 Overlooked Features of a Data Backup Strategy

    When it comes to implementing an airtight backup-and-recovery plan, these are the four must-have features that many enterprises nevertheless tend to forget.

  • Microsoft Bolsters Kubernetes with Azure Confidential Computing

    Microsoft on Tuesday announced various developments concerning the use of Kubernetes, an open source container orchestration solution fostered by Google.

  • Windows Will Have Support for Encrypted DNS

    Microsoft announced this week that the Windows operating system already has support for an encrypted Domain Name System option that promises to add greater privacy protections for Internet connections.

comments powered by Disqus

Office 365 Watch

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.