C # Summary (4) Summary of visual studio shortcut keys

Source: Internet
Author: User

I recently saw the Console that the instructor talked about in the C # Video. writeLine () only needs to write down cw, and then press the tab key twice. I didn't know it before, And suddenly felt very useful, so I collected some related shortcut keys, hope to be useful to you.

1. code writing:

Shift + Alt + Enter -- full screen display

Shift -- Alt + F10 ----- open the option for implementing the interface, continue to press I to implement the interface, and rename by R

Ctrl + R + E -------- encapsulate Fields

Ctrl + J ---------- list members, including only code prompts

Tab (press twice) -------- fill the code block, for example, after try, for, do

Ctrl + K + S --------- external code, including code block Template

"Cw" + Tab ------------ Console. WriteLine ();

"Mbox" + Tab ----------- MessageBox. Show ();

Ctrl + Shift + Space ----------- parameter information

F6/Ctrl + Shift + B ----------- generate a solution

F7 ---------- jump to the code behind the form, which can be found in WinForm and WebForm.

 

2. Code operation:

Ctrl + K + C ------ comment

Ctrl + K + U ------ uncomment

Ctrl + J --------- search for matching parentheses

Ctrl + Shift + J ---------- select matching brackets and their code

Ctrl + F --------- quick search

Ctrl + H --------- quick replacement

Ctrl + Shift + U --------- convert to uppercase

Ctrl + U ------- convert to lowercase

Ctrl + K + D ------- set the document format

Tab --- add indentation

Shift + Tab ------ reduce indentation

Ctrl + M -------- collapse the Code. For example, place the cursor in the position of # region, if, and method header, and collapse them.

 

3. debug and run:

F5; start debugging

Shift + F5 --- stop debugging

F9 --------- set a breakpoint

Ctrl + Shift + F9 --------- delete all breakpoints

F10 ------ process-by-process debugging

F11 ------ statement-by-statement debugging

 

4. Project operations:

Alt + Enter ---------- open the Properties dialog box for the selected item

Ctrl + Shift + N ----- create a project

Shift + Alt + N ------- create a website

Ctrl + N --------- create a file

Ctrl + Shift + O -------- open the project

Ctrl + Alt + O ------- open the website

Ctrl + O ---------- open the file

 

5. View call:

F4 ------- attributes

Ctrl + Alt + X ---- toolbox

Ctrl + Alt + L ------ solution Resource Manager

Ctrl + Alt + S -------- server Resource Manager

 

Supplement: How do I organize the code in the program?

Ctrl + K + F: indicates the code of the selected or current row.

Ctrl + K + D: Sort all the code

A better method: VS compiler has the alignment function when the code is correct. If there is no alignment, you can delete the last braces and press the braces to automatically sort out the code.

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.