After many years of visual Studio, today only to find this coding skills, it is really ashamed to share, it is a tip!
Development environment: Vs2010+c#
1. Code refactoring new Class
If you use the right-click shortcut menu to create a new class like I used to, it's out of the way. VS's That "New Item dialog" comes out very slowly and affects the mood.
When you find that you need to define a class, the correct method:
1) Define the class name at the current code, e.g.:list<newclass> ls;
2) Focus moves to Newclass, press CTRL +. ("point")
3) Enter.
So the class is built. This method also applies to methods, properties, fields of a class, rename field method names, and so on.
2. Extraction method
Sometimes we find ourselves always writing the same piece of code, we can extract a method, how to do it? Do it with me.
1) Do not use the mouse to select our code
2) Press Ctrl+r and press M (note that this is a two-time press)
3) Enter the method name in the pop-up dialog box, return
3. Insert a shortcut phrase
Quickly define dependency properties
1) Input PROPD
2) quickly press two times TAB key
3) in the selected area, press the TAB key to switch to the next area, and enter after completion.
Actually just inserted is a shortcut code phrase Snippet,vs can define itself, through the "Tools" menu and the code Snippet manager.
4. Other shortcut keys
Quick Switch Tab: Ctrl+tab
Jump to the beginning or end of a word: Ctrl + Left and right arrows
Full screen editing code: Shift+alt+enter
Bring up the Immediate window: ctrl+alt+i
More will be some shortcut keys, you can reduce the mouse keyboard to switch back and forth, effectively save the encoding time.