Refactoring and Rename Dialog Box (Visual Basic)
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Refactoring and Rename Dialog Box (Visual Basic)

Use Visual Basic's built-in Rename dialog box to rename identifiers in your code for symbols such as fields, local variables, methods, namespaces, properties, and types. You can open the Rename dialog box by right-clicking the element declaration.

New Name

Specifies the new name for the code element.


Identifies the namespace to search when you perform the rename operation.

The Rename dialog box performs slightly different rename operations, depending on the type of the element renamed.

Element type

Rename Operation


Changes all declarations and all usages of the class to the new name. For partial classes, the rename operation propagates to all parts.


Changes the declaration and usages of the field to the new name.

Local variable

Changes the declaration and usages of the variable to the new name.


Changes the name of the method and all references to that method to the new name.


Changes the name of the namespace to the new name, in the declaration, all Imports statements, and all fully qualified names.


Changes the declaration and usages of the property to the new name.

To provide a complete refactoring experience, Visual Basic has partnered with Developer Express Inc. to obtain refactoring support. See Refactor! ( on the MSDN Visual Basic Developer Center for additional details and instructions on how to download this tool. Refactor! supports more than 15 individual refactoring features. This includes operations such as Reorder Parameters, Extract Method, Encapsulate Field, and Create Overload.

© 2015 Microsoft