

Using Visual Studio, you can click on Edit -> Advanced -> Format Document Auto Format Visual Studio Document on Save If you want to change Visual Studio shortcut, you can define new key bindings by going to Tools -> Options -> Environment -> keyboard. Note: if there is opening bracket (), but not closing bracket then above shortcut will not work. You can simply use CTRL +K then CTRL+D to format current document in Windows Let's take a look at various ways using which you can format code or current open file using Visual Studio Using Shortcutįor Visual Studio 2010/2013/2015/2017/2019/2022


Format Visual Studio Shortcut with Indentation In previous article, I mentioned Convert C# Class to JSON with Example but in this article, I have mentioned how we can format code in Visual Studio and how we can also auto format code (with indentation) on save in Visual Studio.
