Tuesday, 22 November 2016

Visual Studio Short cuts makes my job easier

CTRL+M CTRL+M (that's two key presses!) - collapse/open the current parent region

CTRL+M CTRL+L - Collapse/Open all regions in document recursively (meaning you might get only one line in the document - one big namespace region which is collapsed or you'll see the entire page code uncollapsed

CTRL+M CTRL+O - Collapse all regions not recursively

Prop tab tab     - to create property in the class

[type keyword] +tab   - To generate type

Eg:   class<press Tab>   - It will generate class


while<press Tab>   -to generate while loop
for<press Tab>       - to generate for loop
foreach<press Tab>       - to generate for each loop
do<press Tab>       - to generate do while loop

Ctrl+k+d    --- to align the code in the visual studio

Ctrl+ shift+b   -- to build solution

ctrl+shift+A   -To add any new item(class,interface,web page etc.) in the solution explorer


How to create a region

Select all code to which you want to generate region and then press

ctrl+S+ choose #region or    #region + <press tab>


Code snippets:

ctrl+X and choose which ever you want.




No comments :

Post a Comment