Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to surround code blocks with try/catch in VisualStudio 2010

I know that Visual Studio has some tools for fast surrounding by code snippets, for example how to do more faster try/catch code blocks. but I can't find a hotkey combination to do this. Who knows the hotkey combination for try/catch?

like image 432
asolovyov Avatar asked Nov 28 '12 09:11

asolovyov


2 Answers

Press "Ctrl + K, S" and then in drop down menu double click "try" - it's a "try-catch" template.

like image 77
Sasha Avatar answered Sep 30 '22 18:09

Sasha


Try Ctrl + K, Ctrl + S.
Source

like image 30
Daniel Hilgarth Avatar answered Sep 30 '22 18:09

Daniel Hilgarth