Surround With: Ctrl + K, Ctrl + S

This Visual Studio shortcut is awesome! Use it to encapsulate an existing block of code; it has options for using, if/else, try/catch, loops, and more.

How to use:

  1. Enter the Visual Studio shortcut command
  2. Choose the construct by typing the name or pressing the up/down arrows
  3. Hit Enter
  4. The code is inserted similar to using a code snippet
  5. If more than one input, use Tab to navigate them
  6. Use Enter to complete the snippet

Surround with an if/else statement gif

Surround with a try/catch statement gif