Renaming a Field or Method
See Also
To rename a field or method and update references to it throughout your project:
- In the Source Editor, right-click the field or method and choose Refactor > Rename
from the contextual menu.
- In the Rename dialog box, type the New Name.
- Optionally, click Preview. In the Refactoring window, at
the bottom of the Source Editor, review the lines of code that will be changed and
clear the checkbox of any code that you do not want changed.
- Click Do Refactoring to apply the selected changes.
- For quick in-place renaming, place the cursor in the item that you
want to rename, and press Ctrl-R. Then type the new name. To finish
renaming, press Escape.
- See Also
- Refactoring: Quick Reference
- Renaming a Class or Interface
- Undoing Refactoring Changes
Legal Notices