如何使Visual Studio自动为功能块生成括号? [英] How do I make Visual Studio auto generate braces for a function block?

查看:458
本文介绍了如何使Visual Studio自动为功能块生成括号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发誓我见过人们在输入函数标头然后敲击某些键组合以自动创建函数花括号并将光标插入它们之间,如下所示:

I could swear I've seen people typing function headers and then hitting some key combination to auto-create function braces and insert the cursor between them like so:

void foo()_

void foo()
{
    _
}

这是内置功能吗?

推荐答案

查看 Resharper -它是具有此功能的Visual Studio插件,还有许多其他开发帮助.

Check out Resharper - it is a Visual Studio add-on with this feature, among many other development helps.

另请参见 C#补充程序,另一个附件.

Also see C# Completer, another add-on.

如果您想自己动手制作,请查看这篇文章.疯了,但是应该这样做.

If you want to roll your own, check out this article. Insane that one should have to do that, though.

这篇关于如何使Visual Studio自动为功能块生成括号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆