• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 457
  • Last Modified:

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.
0
mathieu_cupryk
Asked:
mathieu_cupryk
2 Solutions
 
MarcjevCommented:
Try:
Edit/Advanded/Format document  CTRL-E D or
Edit/Avanced/Format selection Ctrl-E F
(and file extension should be .cs)
0
 
aphillipsCommented:
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.
0
 
mathieu_cuprykAuthor Commented:
MARCJEC it says is not a command the combination.
0
 
philipjonathanCommented:
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
0
 
MarcjevCommented:
The key combination can be changed visual studio. You should use the menu as suggested by myself and philipjonathan.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now