There are several smart and simple short cuts and key strokes available in visual studio which will easier your coding. Some times you will copy the text to visual studio to make modications easier. Here some of such tips are given. This is for beginner level.
Key short cuts.
1. Deleting entire line.
Ctrl+ del --> Without selecting the line you can delete the line.
2.Square selection.
You have string like this
DeleteMyString += "one";
DeleteMyString += "two";
DeleteMyString += "three";
DeleteMyString += "four";
and want to make like this
MyString += "one";
MyString += "two";
MyString += "three";
MyString += "four";
Normally you will find and replace the strings. Just follow the below method and do that easily.You can select only the 'Delete' word of each line and delete like....
Just Press Alt & select the area you want to delete by your mouse.Simple.
3. Matching Braces/comments/region/quotes
Ctrl+] takes you to the matching brace. It also takes you to the matching comment, region or quote depending on what is at the cursor now.
4. Auto completion of Keywords/classes/objects/variable names
Press Ctrl+Space or Alt+RightArrow to auto-complete the word. Intellisense suggestions may pop up a window if there is more than one possibility.Alt + Space will show all the classes/interfaces/objects you can use in the current line.
5.Key Board Shortcuts
a.CTRL+ALT+L:
View Solution Explorer. I use Auto Hide for all of my tool windows to maximize screen real estate. Whenever I need to open the Solution Explorer, it’s just a shortcut away.Related shortcuts: CTRL+ALT+X (Toolbox), F4 (Properties), CTRL+ALT+O (Output), CTRL+\, E (Error List), CTRL+\, T (Task List).
b.F12:
Go to definition of a variable, object, or function.
c.SHIFT+F12:
Find all references of a function or variable.
d.F7:
Toggle between Designer and Source views.
e.CTRL+PgDn:
Toggle between Design and Source View in HTML editor.
f.F10:
Debug - step over. Related debugging shortcuts:F11 (debug - step into), SHIFT-F11 (debug - step out), CTRL-F10 (debug - run to cursor). F9 (toggle breakpoint).
g.CTRL+D or CTRL+/:
Find combo (see section on Find Combo below).
h.CTRL+M, O:
Collapse to Definitions. This is usually the first thing I do when opening up a new class.
i.CTRL+K, CTRL+C:
Comment block. CTRL+K, CTRL-U (uncomment selected block).
j.CTRL+-:
Go back to the previous location in the navigation history.
k.ALT+B, B:
Build Solution. Related shortcuts: ALT+B, U (build selected Project), ALT+B, R (rebuild Solution).
l.CTRL+ALT+Down Arrow:
Show dropdown of currently open files. Type the first few letters of the file you want to select.
m.CTRL+K, CTRL+D:
Format code.
n.CTRL+L:
Delete entire line.
o.CTRL+G:
Go to line number. This is useful when you are looking at an exception stack trace and want to go to the offending line number.
p.SHIFT+ALT+Enter:
Toggle full screen mode. This is especially useful if you have a small monitor. Since I upgraded to dual 17" monitors, I no longer needed to use full screen mode.
q.CTRL+K, X:
Insert "surrounds with" code snippet. See Snippets tip below.r.CTRL+B, T: Toggle bookmark. Related: CTRL+B, N (next bookmark), CTRL+B, P (prev bookmark).
Key short cuts.
1. Deleting entire line.
Ctrl+ del --> Without selecting the line you can delete the line.
2.Square selection.
You have string like this
DeleteMyString += "one";
DeleteMyString += "two";
DeleteMyString += "three";
DeleteMyString += "four";
and want to make like this
MyString += "one";
MyString += "two";
MyString += "three";
MyString += "four";
Normally you will find and replace the strings. Just follow the below method and do that easily.You can select only the 'Delete' word of each line and delete like....
Just Press Alt & select the area you want to delete by your mouse.Simple.
3. Matching Braces/comments/region/quotes
Ctrl+] takes you to the matching brace. It also takes you to the matching comment, region or quote depending on what is at the cursor now.
4. Auto completion of Keywords/classes/objects/variable names
Press Ctrl+Space or Alt+RightArrow to auto-complete the word. Intellisense suggestions may pop up a window if there is more than one possibility.Alt + Space will show all the classes/interfaces/objects you can use in the current line.
5.Key Board Shortcuts
a.CTRL+ALT+L:
View Solution Explorer. I use Auto Hide for all of my tool windows to maximize screen real estate. Whenever I need to open the Solution Explorer, it’s just a shortcut away.Related shortcuts: CTRL+ALT+X (Toolbox), F4 (Properties), CTRL+ALT+O (Output), CTRL+\, E (Error List), CTRL+\, T (Task List).
b.F12:
Go to definition of a variable, object, or function.
c.SHIFT+F12:
Find all references of a function or variable.
d.F7:
Toggle between Designer and Source views.
e.CTRL+PgDn:
Toggle between Design and Source View in HTML editor.
f.F10:
Debug - step over. Related debugging shortcuts:F11 (debug - step into), SHIFT-F11 (debug - step out), CTRL-F10 (debug - run to cursor). F9 (toggle breakpoint).
g.CTRL+D or CTRL+/:
Find combo (see section on Find Combo below).
h.CTRL+M, O:
Collapse to Definitions. This is usually the first thing I do when opening up a new class.
i.CTRL+K, CTRL+C:
Comment block. CTRL+K, CTRL-U (uncomment selected block).
j.CTRL+-:
Go back to the previous location in the navigation history.
k.ALT+B, B:
Build Solution. Related shortcuts: ALT+B, U (build selected Project), ALT+B, R (rebuild Solution).
l.CTRL+ALT+Down Arrow:
Show dropdown of currently open files. Type the first few letters of the file you want to select.
m.CTRL+K, CTRL+D:
Format code.
n.CTRL+L:
Delete entire line.
o.CTRL+G:
Go to line number. This is useful when you are looking at an exception stack trace and want to go to the offending line number.
p.SHIFT+ALT+Enter:
Toggle full screen mode. This is especially useful if you have a small monitor. Since I upgraded to dual 17" monitors, I no longer needed to use full screen mode.
q.CTRL+K, X:
Insert "surrounds with" code snippet. See Snippets tip below.r.CTRL+B, T: Toggle bookmark. Related: CTRL+B, N (next bookmark), CTRL+B, P (prev bookmark).