Friday, May 11, 2007

Visual Studio 2005 Tips & Tricks #1 - Automatically format the code

Visual Studio 2005 Tips & Tricks - Automatically format the Code

I have seen many managers pay more attention to how code is written (mainly to alignment, spacing and indendation), even previous programming languages like FORTRAN 77 & COBOL 65 had particular column numbers where we need to code exactly.

But mainly coding is formated to make it more readable and to look neat for another developer to read and to try to understand.

But most of the developers do not align their code properly making it worse to read and understand, though this is not a new feature in VS2005 it is one of the essential features for any IDE to possess and here it is. Note: It is also present in VS2003, and other famous editors like homesite etc but many developers do not use it and still we see poorly aligned code making it hard to read.

Open the IDE, go to Edit >> Advanced >> Format Document, and
the source and code behind is automatically formated and aligned very neatly with indendation.



Read more tips coming soon on my blog.

No comments: