It took years of visual Studio to discover this coding technique today, and it's a shame to share it.
Development environment: Vs2010+c#
1, code refactoring new class
If you're still like me. Use the right-click shortcut menu to create a new class, which is too out. VS, the "New Item dialog" comes out very slowly and affects your mood.
When you find that you need to define a class, the correct approach is:
1 define the class name at the current code, such as:list<newclass> ls;
2 Focus move to Newclass, press CTRL +. ("point")
3) Carriage return.
So the class is built. This method also applies to the class's methods, properties, fields, rename field method names, and so on
2. Extraction Method
Sometimes we find ourselves always writing the same piece of code, can extract a method, how to do? Do it with me.
1 without the mouse to select our code
2 Press Ctrl+r, press M (note that this is divided two times)
3 Enter the method name in the pop-up dialog box, carriage return
3. Insert Shortcut phrase
Quickly define dependency properties
1) Input PROPD
2) Quick Press two times tab key
3 Enter in the selected area, press the TAB key to switch to the next area, complete the return.
In fact, just inserted a shortcut code phrase SNIPPET,VS can be defined, through the "Tools" menu => code Snippets Manager.
4. Other shortcut keys
Quick Switch Tab: Ctrl+tab
Jump to the beginning or end of a word: Ctrl + LEFT ARROW
Full screen editing code: Shift+alt+enter
Pull up Immediate window: ctrl+alt+i
Many shortcut keys, you can reduce the mouse keyboard switching back and forth, effectively save coding time.