----------------------------------------------------------------
Code writing
----------------------------------------------------------------
Shift + Alt + Ente r Full-screen display
Shift + Alt + F10- Open the option to implement the interface, continue pressing I to implement the interface, press R to rename
Ctrl + R + E- encapsulate Field (VS) has basically no need for this shortcut, because c#3.0 's Automatic properties – auto-implementedproperties )
Ctrl + J- list members, including code hints only
Tab ( double-click )-completes the code block, for example , after try,for,do, and press
Ctrl + K + S- outside code, including code block templates only
"CW" + tab+ Tab-console.writeline ();
"Mbox" + tab+ tab-messagebox.show ();
Ctrl + Shift + space- parameter Information
F6/ctrl + Shift + B- Build Solution
F7- jump to form post code,in WinForm ,WebForm
f12– go To Definition
----------------------------------------------------------------
Code manipulation
----------------------------------------------------------------
Ctrl + K + C- Notes
Ctrl + K + U- Cancel Comment
Ctrl +]- look for matching parentheses
Ctrl + Shift +]- Select the matching parentheses with the code in it
Ctrl + F- Quick Find Ctrl + H- Quick Replace
Ctrl + Shift + U- Convert to uppercase Ctrl + U- Convert to lowercase
Ctrl + K + D- Formatting Documents ( format document )
Tab- Increase Indent Shift + Tab- Reduce Indentation
Ctrl + M + M- collapse the code, such as placing the cursor #region , if , the position of the method header, will collapse them
----------------------------------------------------------------
Debug Run
----------------------------------------------------------------
F5- Start Debugging
Shift + F5- Stop Debugging
F9- Set Breakpoints F10-step-by-step debugging F11-Step-by-step debugging
Ctrl + Shift + F9- Delete all breakpoints
F4: Opens the Properties window.
F3: Finds the next matching object.
-----------------------------------------------------------------
Operation of the project
------------------------------------------------------------------
Alt + Enter- Opens the Properties dialog box for the selected item
Ctrl + SHIFT + N- new Item SHIFT + ALT + N- new site
Ctrl + N- new file
Ctrl + SHIFT + O- Open Item SHIFT + ALT + O- open Web site
Ctrl + O- Open File
----------------------------------------------------------------
View Call
----------------------------------------------------------------
F4- Properties
Ctrl + Alt + X- toolbox
Ctrl + Alt + L- Solution Explorer
Ctrl + Alt + S- Server Explorer
-----------------------------------------------------------------
Skills
-----------------------------------------------------------------
1. double-click the Control tool to add the control automatically.
2. Alt + arrow key - use arrow keys to resize controls
3. arrow keys - Adjust the position of the control
4. removing unwanted namespaces
Right-click the mouse in the class, select: Organize using > Remove and sort to remove the unwanted namespaces and arrange the namespaces in alphabetical order.
5. copy a line of code
simply press the cursor on the line where CTRL + C copies the contents of the line.
and then you just have to press Ctrl + V to paste the contents of the line.
Similarly, if you delete a line of content, simply press the Ctrl+x can be.
6. introduce the namespace of the class
Mouse positioning to the class name, right-click, select "Parse" to find the appropriate namespace, introduced.
7. attribute Declarations
type "prop" inside the class,and then press Tab+tab tomake the property template appear, and then you just use the TAB key to populate your template parameters. Can save a lot of time.
When the declaration of a property is complete, you can encapsulate the field by selecting the property right-click-Refactor-Encapsulate field, instead of manually writing the code.
8. Comment Code
Ctrl+k+c (annotation scope contains almost all types such as:ASP. NET page,Web. config file,JavaScript file),ctrl+k+u (uncomment)
9. virual Studio Internal Multi-window file switching
Press the key combination Ctrl+tab to switch files
SQL Express Database
when a project file is added to a SQL Express database, you can quickly link to the database by double-clicking the MDF file in the App_Data file . Double-clicking the database will open the server resource
Add an existing project file
In the project's Solution Explorer , right -click Add- Existing Items to add, which is slow and cannot be added.
The best way to do this is to drag (or copy, paste) these files or folders into the current Solution Explorer.
Add new Items with Ctrl + N or ctrl+shift+a
CTRL + N - applies to ASP .
Ctrl+shift+a-Applies in boththe Web site and the ASP. NET MVC Web reference program.
toggle between two highlighted words
when the mouse selects a word, all the words are highlighted, at which point you can the Ctrl+shift+up/down key switches between each word in turn.
This article from "Studybao" blog, declined reprint!
Visual Studio shortcut keys