source: http://blogs.msdn.com/karenliu/archive/2007/06/21/tips-and-tricks-for-vs20005-and-vs2008.aspx
Tips and Tricks for VS20005 and VS2008
Tips for Understanding Code
1) [VS 2008] Target Multiple Versions of the Framework
- Use .NET 3.0 to target Vista
- Use .NET 3.5 to get started with LINQ
- Project | Properties | Application Tab
2) C# Development Settings
- Share your settings
- Tools | Import and Export Settings
3) Add New Item
- [VS 2008] Categorical
- Filter-as-you-type
4) Class Designer
- Visual, high-level view of relationships in code
- Use it to explore the framework
5) Active File Drop-down (Ctrl + Alt + Down Arrow)
6) Collapse to Definition (Ctrl+M, 0)
7) Go to Definition (F12)
- Quickly navigate to the definition
8) GTD Navigation Stack (Ctrl+Shift+7, Ctrl+Shift+8)
9) Find All References (Shift+F12)
- Number of references
- Cyclical
10) Iterate through List Window (F8)
11) Find Combo Box (Ctrl + /)
- Go to line (Ctrl+G)
- Go to file in project (Ctrl+Shift+G)
- Help (keyword+F1)
- Mini-command window (>)
Tips for Writing and Modifying Code
12) Rename
- Entry points for rename (use solution explorer for file rename)
- [VS 2008] Support for C# 3.0
13) Code Snippets
14) Invoke Smart Tag (Ctrl + .)
- Never take your hand off the keyboard
15) Add Using
- Automatically adds using directives
16) Generate Method Stub
- Consume first, declare later
17) Snippets for Code Generation
18) [VS 2008] IntelliSense for Object Initalizers
- Filter as you initialize
- Ctrl+J for all members
19) [VS 2008] IntelliSense for Query Expressions
20) [VS 2008] Quick Info for C# 3.0 Understanding
21) IntelliSense Customization
- [VS 2008] CTRL for transparency
- Tools | Options | Text Editor | C# | IntelliSense
22) [VS 2008] Customize Formatting Style
- C# 3.0 Support
- Tools | Options | Text Editor | C# | Formatting
23) Customize your Context Menu
24) [VS 2008] Debugging Query Expressions
25) [VS 2008] Organize Usings
- Remove
- Sort
- Tools | Options | Text Editor | C# | Advanced