Visual Studio 2010 tips

Source: Internet
Author: User
Tags visual studio 2010

1. How to format the code?

If the code layout is messy, you can press Ctrl + k and F to make the entire page layout. You can also press Ctrl + k and D to perform partial layout. Select the code block to be typed before the layout. 2. How to Create a rectangular selection area?

Two Methods: I. Hold down the Alt key and drag the mouse. Ii. Press SHIFT + ALT and click the upper left and lower right positions of the rectangle.

  3. How to quickly switch between different windows?

CTRL + Tab

  4. How to generate a solution?
CTRL + Shift + B 5. How to quickly add a code segment?Enter prop and press the tab twice to insert the automatic attribute public int myproperty {Get; Set ;}, (enter try, class, foreach, and so on. Pressing the tab twice also has a similar effect .) 6. How to call smart prompts?
Two Methods: I. CTRL + J II. Alt + → 7. How to create a region to facilitate code reading?
# Region
Code Area
# Endregion 8. How to add a namespace quickly?
For a class that references a DLL but does not reference its namespace in the code, enter the class name and press Ctrl +. On the class name, you can automatically add the reference namespace statement for the class.

9. How to Use the task manager?
If the project we developed is large and some code in the project is not complete, we can mark it for future search.

Create method: Enter: // todo:... content...
Usage: View-> task list-> comment

10. Quick Start of command line
"Inetmgr" IIS manager. You don't have to go to management to find it. It will soon show IIS management.
"Sqlwb" Quick Start sql2005 Enterprise Manager
"Isqlw" is provided by SQL2000. This can be used as the SQL2000 query analyzer.
"Devenv" starts the corresponding version of vs Studio

11. F12, CTRL + minus sign, CTRL + Shift + minus sign
These three keys are particularly useful when viewing code. With F12, you can quickly find a function definition. With Ctrl + minus signs, you can quickly return to the function call.

12. How to jump to a specified row?
Two Methods: I. CTRL + G II. Click the row number in the status bar

13. Rename classes, methods, fields, and

Right-click the type name, refactor, and rename it. CTRL + R, R

 

14. Use of shortcut keys

CTRL + Shift + u: all are capitalized
CTRL + u: shortcut key for lowercase code

CTRL + Shift + A: new item

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.