Refactoring in Visual Studio
Note
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
Refactoring is the process of modifying code in order to make it easier to maintain, understand, and extend, but without changing its behavior. Some common refactorings include:
splitting long functions into smaller ones
renaming variables, types, functions or parameters
reordering parameters
removing or reordering using directives
Because the logic of refactoring is closely tied to language syntax, each language service in Visual Studio provides its own refactoring capabilities. For more information, see the following pages:
Refactoring in C#
Refactoring in Visual Basic
Refactoring and Rename Dialog Box (Visual Basic)
Refactoring in C++
Writing and refactoring code (C++)
Refactoring in F#
Refactoring support for F# is provided in Visual F# Power Tools, a third-party Visual Studio extension.