?
Solved

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

Posted on 2008-06-24
5
Medium Priority
?
443 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 10

Accepted Solution

by:
Marcjev earned 1000 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 1000 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

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.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

800 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