Thursday, January 26, 2023

How do you auto format code in Visual Studio?

Visual Studio 2019 & 2022

  1. Format Document, While you're holding down Ctrl button, first press K then D
  2. Format Selection, While you're holding down Ctrl button, first press K then F

or just click Edit => Advanced => Format Document / Format Selection

2023-01-26_23-34-09

Happy formatting!!

No comments:

Post a Comment