简体   繁体   English

如何在 VisualStudio 2010 中使用 try/catch 包围代码块

[英]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.我知道 Visual Studio 有一些工具可以通过代码片段快速包围,例如如何更快地执行 try/catch 代码块。 but I can't find a hotkey combination to do this.但我找不到热键组合来做到这一点。 Who knows the hotkey combination for try/catch?谁知道 try/catch 的热键组合?

按“Ctrl + K, S”,然后在下拉菜单中双击“try”——这是一个“try-catch”模板。

Try Ctrl + K, Ctrl + S.试试 Ctrl + K、Ctrl + S。
Source 来源

按 Ctrl + K,然后按 CTRL + S 键入 T 按 Enter 或 Tab

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM