Udostępnij za pośrednictwem


Refactoring Shortcut Keys, General Development Settings

The following key combinations can be used to edit code to improve it after it has been written.

Command Name

Shortcut Keys

Description

Refactor.EncapsulateField

CTRL + R, CTRL + E

Displays the Encapsulate Field Dialog Box, which allows you to create a property from an existing field and then updates your code to refer to the new property.

Refactor.ExtractInterface

CTRL + R, CTRL + I

Displays the Extract Interface Dialog Box, which allows you to create a new interface with members derived from an existing class, struct, or interface.

Refactor.ExtractMethod

CTRL + R, CTRL + M

Displays the Extract Method Dialog Box, which allows you to create a new method from a code fragment of an existing method.

Refactor.PromoteLocalVariabletoParameter

CTRL + R, CTRL + P

Moves a variable from a local usage to a method, indexer, or constructor parameter while updating the call sites correctly. For more information, see Promote Local Variable to Parameter.

Refactor.RemoveParameters

CTRL + R, CTRL + V

Displays the Remove Parameters dialog box, which removes parameters from methods, indexers, or delegates by changing the declaration at any locations where the member is called. For more information, see Remove Parameters.

Refactor.Rename

CTRL + R, CTRL + R

Displays the Rename Dialog Box, which allows you to rename identifiers for code symbols such as fields, local variables, methods, namespaces, properties, and types.

Refactor.ReorderParameters

CTRL + R, CTRL + O

Displays the Reorder Parameters Dialog Box, which allows you to change the order of the parameters for methods, indexers, and delegates.

See Also

Reference

General Development Settings Default Shortcut Keys