TechyMedia

A .NET Technology blog | .NET,C# Progamming,C# tutorials,WPF WCF|Software Engineer

NAVIGATION - SEARCH

Best Useful Shortcut Keys in Visual Studio, Code Snippets in Visual Studio 2010

Code Snippet generating shotcut , Few letters(like ctor,prop,do,lock etc ) plus 2 times Tab key enter will create the corresponding code skeleton for you.Mastering these 3-4 letter words only will reduce your typing time considerably.

Shortcut keys are many in Visual studio.Following are the best and hottest as far as I believe.Hope you enjoy them as much.Mastering only these shortcut key combinations will boost up your coding speed for sure.

1)  Code Snippet generating shotcut , Few letters(like ctor,prop,do,lock etc ) plus 2 times Tab key will create the corresponding code skeleton for you.

class + Tab Tab >>

class MyClass 
{ 

}
 

Interface + Tab Tab >>

interface IInterface 
{ 

}


 ctor+ Tab Tab >>

public Sample () { }

prop + Tab Tab >>

public int MyProperty { get; set; }

propfull + Tab Tab >>

private int myVar; 

public int MyProperty 
{ 
     get
     { 
         return myVar;
      } 
      set 
      { 
          myVar = value;
       } 
}
 

cw + Tab Tab >>

Console.WriteLine();

mbox + Tab Tab >>

System.Windows.Forms.MessageBox.Show("Test");

swit + Tab Tab

switch (switch_on) 
{ 
    default: 
}
 

if + Tab Tab >>

if (true)
{

 }  

and lot many similar . . . . .



2) Ctr + . >>  For implementing Interface method stubs and for resolve namespace(i.e Adding using on top)  

This single key combination can be used for multiple purposes.Very useful in most situations.

3) Ctrl + -      >>  Take back to the last cursor point.
This shortcut key combination I found very useful since most of the time i need to navigate
back to my previous cursor points.

4) Ctrl + F  and F3  >>  Navigate and Find

Press Ctrl-F and type the required word to find.Then pressing F3 will navigate you to the next serch word.This also I found very useful and comes in use quite frequently.

5)  F12 and Shift + F12  >> Jump to defenition and Find all references

Finding definition of a method or variable or anything is highly needed during the course of coding.Similary Find all references also common usage in every developers life.

For more detailed list of most frequently used shortcut keys in Visual studion check my article here 

Most Frequently Used Shortcut Keys in Visual Studio

Pingbacks and trackbacks (1)+

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading