Refactor code
Applies to: Visual Studio Visual Studio for Mac
Note
This article applies to Visual Studio 2017. 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.
Different refactoring operations are available for different programming languages in Visual Studio:
- The pages in this section of the table of contents cover the refactorings available for C# and Visual Basic. Some examples are Extract a method refactoring and Move type to a matching file refactoring.
- For information about refactoring C++ code, see Write and refactor code (C++).
- Refactoring support for F# is provided by the Visual F# Power Tools, a third-party Visual Studio extension.