Поделиться через


How to: Change text case in the editor

Applies to: yesVisual Studio noVisual 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

You can use menu commands or keyboard shortcuts to convert the case of selected text to all upper case or to all lower case.

Note

The dialog boxes and menu commands you see might differ from those described in this article, which are based on the General environment settings. To change your environment settings, choose Tools > Import and Export Settings, and then choose Reset all settings.

To change text case

  1. Select the text you want to convert.

  2. To convert text to all upper case, choose Edit > Advanced > Make Uppercase or press Ctrl+Shift+U.

    To convert text to all lower case, choose Edit > Advanced > Make Lowercase or press Ctrl+U. (If you have the C++ development workload installed, this keybinding may be used by a different command.)

Tip

To revert to the previous case formatting before this change, select Undo from the Edit menu.

See also