To change a property to setter/getter methods
Place the caret at the name of a property in the editor, in the
File Structurewindow, in Class Viewor Object Browser.
Do one of the following:
On the main menu, choose
ReSharper| Refactor | Convert | Property to Method(s).
Ctrl+Shift+R, then click Convert Property to Method(s).
- On the main menu, choose
Convert Property to Method(s)dialog opens. Type method names in the appropriate boxes or leave the default ones:
For a read-write property you may generate a pair of methods, or a single method for either getter or setter, by leaving the appropriate check box selected.
Next. The property is converted into appropriate method(s). At the same time, all usages of the property (both read and write) will be substituted with the corresponding method calls.