Wednesday, February 18, 2015

Visual Studio Tips

Ctrl-K +C

Press Ctrl and then Press K followed by C (Ctrl K C) (To comment the Code)

Example:




=================================================
To Write Exceptions(try, catch) in part of Code.

Ctrl +K , Ctrl +S    Alt-Shift-Arrow(Right,Left,Bottom,Top)

Here is my Code below, and now i want to Add try, catch block to it.




So, first select the block of code as shown below.




and then Press Ctrl+K first and  followed by Ctrl + S




And, now u can see the code with try and catch block.







===============================================
Ctrl-K +U

Press Ctrl and then Press K followed by U (Ctrl K U) (To uncomment the Code)

Example:



=================================================
Ctrl -K+D

To format the Code.

Select, the Code as shown below.



 and then press Ctrl-K followed by D




No comments:

Post a Comment

Thank you for visiting my blog

Kubernetes

Prerequisites We assume anyone who wants to understand Kubernetes should have an understating of how the Docker works, how the Docker images...