Archive for the ‘Visual Studio 2010’ Category

Visual Studio 2010 Not Remembering Last Session

I observed some problem with VS2010 lately as it is no more reloading my last session like opened documents etc.

To Fix this issue:

Under Tools -> Import and Export Settings -> Reset all settings.

Visual Studio Code Formatting

Well written code will have proper formatting & indentation. This helps to read the code much easier.

Visual Studio has built in features which automatically format the code as we write. It also provides customization features using which we can tell Visual Studio to How our code should be formatted. To do this we can make use of Options dialog.

To invoke this dialog click on menu item Tools -> Options. From Options dialog select Text Editor -> C# -> Formatting

Visual Studio 2008 Options Dialog

Visual Studio Options Dialog

We can format document using menu item Edit -> Advanced -> Format Document. Keyboard shortcut Ctrl + E, D