Need get a program to align my code automatically in visual C#

I need to have all my code align in C#. in VB.Net it is ok. But for some reason it does not align my code.
Anything that can help me.
Who is Participating?
MarcjevConnect With a Mentor Commented:
Edit/Advanded/Format document  CTRL-E D or
Edit/Avanced/Format selection Ctrl-E F
(and file extension should be .cs)
aphillipsConnect With a Mentor Commented:
In Visual Studio the code should be automatically formated as you enter it as long as the IDE thinks its is a C# file (has file extension .cs) and you have the options turned on (see Tools/Options/Text Editor/C#/Formatting/Indentation).

To reformat existing code use Edit/Advanced/Format Document.
mathieu_cuprykAuthor Commented:
MARCJEC it says is not a command the combination.
There is already an in-built function in Visual Studio.
You just need to highlight the portion of the code that you want to reformat, then choose Edit -> Advanced -> Format Selection / Document
The key combination can be changed visual studio. You should use the menu as suggested by myself and philipjonathan.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.