How do you tell visual studio to reindent all code so you can match up the "if/else" "while", and strucs like that

Posted on 2009-02-10
Last Modified: 2013-12-17
I have pasted in some code and I am either missing a bracket or have to many brackets and not sure where things are supposed to line up.  Is there any way to tell Visual Studio to reindent all the code?
Question by:kwh3856
    LVL 3

    Accepted Solution

    Ctrl + A


    Ctrl + E  follow by Ctrl + D

    Or simply go to Edit --> Advance --> Format Document

    This will use your format setting in the Tool --> Option --> Text Editor --> your language

    I assume you have Visual Studio install. This is in VS2008, might be slightly different in VS 2005

    Author Closing Comment

    Thank you very much.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now