C # shortcut keys for expanding and collapsing code

Source: Internet
Author: User

C # shortcut keys for expanding and collapsing code

The VS2005 code Editor's expanded and collapsed code is really handy and practical. Here are the shortcut keys used to unwind code and collapse code, which are common:

Ctrl + M + O: Collapse All methods

Ctrl + M + M: Collapse or expand the current method

Ctrl + M + L: Expand All methods

Solve the missing problem in the Toolbox in VS2010:

Press the shortcut key ctrl+alt+x

Fullscreen: Shift+alt+enter
Note Selection: Ctrl+e+c/crtr+e+u
Code formatting: ctrl+e+f

===================================
VS2008 tips for using--shortcut keys
1. How do I adjust the format of the code layout?
Select: Edit, Advanced, format or edit the format of the document, and then set the formatting of the selected code.
Formatted CS code: CTRL+K+F
Format aspx code: CTRL+K+D

2. How do I jump to a specified line?
Two methods: Ⅰ.  Ctrl+gⅱ. Double-click the line number in the status bar

3. How do I create a rectangular selection?
Two methods: Ⅰ. Hold down the ALT key, and then drag the mouse.
Ⅱ. Press and hold Shift+alt to click the upper-left and bottom-right positions of the rectangle.

4. How do I quickly hide or show the current code snippet?
ctrl+mm

5. How to quickly switch between different windows?
Ctrl+tab

6. How do I build a solution?
Ctrl+shift+b

7. How do I quickly add code snippets?
Enter prop and press two tab to insert automatic properties
public int MyProperty {get; set;
}

(Input Tryclassforeach and so on, press two Times tab also has similar effect.) )

8. How do I invoke smart hints?
Two methods: Ⅰ. Ctrl+jⅱ. alt+→

9. How do I invoke the parameter information hint?
Place the cursor over the parameter name and enter the ctrl+shif+ space.

10. How do I see the detailed definition of the code?
Open: View-code Definition window
Then you point the mouse to a method on the page.

11. How do I create an area to facilitate the reading of the code?
#region
Code Area
#endregion

12. How can I modify the properties of multiple controls at the same time?
Select multiple controls, and then right-click Properties, at which point the properties common to these controls will appear, and all controls will change after the modification.

13. How do I quickly add a namespace?
For a class that references a DLL but does not reference its namespace in your code, press CTRL + on the class name after you enter the class name.
You can automatically add a reference namespace statement for the class.

14. How do I make a quick copy or cut a line?
Simply press CTRL + C or ctrl+x to copy or cut the line as long as the cursor is on a line without selecting the line.

15. How do I use Task Manager?
If we develop a large project, some code is not completed in the project, we can make a mark, easy to find in the future.

To create a method: Enter the place you want to mark://todo: ... Content...
How to use: View, Task List, comments

16. Quick start of command line
"Inetmgr" IIS Manager, does not have to go to the management to look for, soon can display IIS manages
"SQLWB" Quick Start SQL2005 Enterprise Manager
"ISQLW" This is SQL2000 I also provide, this can play a SQL2000 Query Analyzer.
"Devenv" launches the corresponding version of VS Studio

17. Ctrl Prompt Transparent window
This is a more interesting key. VS2005, when you are debugging the code, sometimes the message will obscure the code, this time you press CTRL to make the prompt transparent. VS2008 This transparency effect, visible in more places, you might as well do yourself to see.

18, F12, CTRL + Minus, CTRL + SHIFT + minus
These three keys are especially useful when viewing code. With F12 you can quickly find the definition of a function, and you can quickly return to the function's call by CTRL + MINUS sign.

C # shortcut keys for expanding and collapsing code

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.