Newbie
Newbie

Reputation: 473

Does Resharper Code clean up support this

I have a project with a bunch of classes with methods that look like this:

public class Person {
    private string _name;
    ...

    public void setName(string name) {
        this._name = name;
    }
    public string getName()
    {
        return this._name;
    }
    ....
}

Is there a way to get reSharpers Code cleanup feature (or any other tool out there) to refactor the above code to this.

public class Person {
    public string Name { get; set; }
}

I'm guessing there isn't any tool that does this, but it never hurts to ask right?

Thanks

Upvotes: 0

Views: 183

Answers (1)

dahlbyk
dahlbyk

Reputation: 77530

DevExpress Refactor! Pro has a "Convert to Auto-implemented Property" refactoring.

Upvotes: 1

Related Questions