Solved

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

Posted on 2008-06-24
5
433 Views
Last Modified: 2013-12-16
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
Comment
Question by:mathieu_cupryk
5 Comments
 
LVL 10

Accepted Solution

by:
Marcjev earned 250 total points
ID: 21855646
Try:
Edit/Advanded/Format document  CTRL-E D or
Edit/Avanced/Format selection Ctrl-E F
(and file extension should be .cs)
0
 
LVL 3

Assisted Solution

by:aphillips
aphillips earned 250 total points
ID: 21855653
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
 

Author Comment

by:mathieu_cupryk
ID: 21855770
MARCJEC it says is not a command the combination.
0
 
LVL 18

Expert Comment

by:philipjonathan
ID: 21855885
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
 
LVL 10

Expert Comment

by:Marcjev
ID: 21859267
The key combination can be changed visual studio. You should use the menu as suggested by myself and philipjonathan.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question