How to align or format codes in Visual Studio?

This is very simple in Visual Studio. Follow the below steps.

  1. Select the code you want to re-format.
  2. Press Ctrl-K
  3. Press Ctrl-F

The key combination Ctrl-K + Ctrl-F only works on selected text, so make sure you select the code you want to re-format before using it. You can easily reformat the entire code by pressing Ctrl-A  Ctrl-K  Ctrl-F.

Editorial Team
Editorial Team

We are a group of young techies trying to provide the best study material for all Electronic and Computer science students. We are publishing Microcontroller projects, Basic Electronics, Digital Electronics, Computer projects and also c/c++, java programs.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest updates on your inbox

Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.