如何阻止 Visual Studio 插入“对象"?当我输入“new {"时 [英] How do I stop Visual Studio from inserting "object" when I type "new {"

查看:17
本文介绍了如何阻止 Visual Studio 插入“对象"?当我输入“new {"时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在编辑 C# 源文件时,我输入

When editing a C# source file, I type

new {

Visual Studio 将其自动更正为

Visual Studio auto-corrects it to

new object{

有没有办法阻止这种行为?

Is there a way to stop this behavior?

推荐答案

您可以配置正在输入的字符提交当前智能感知选择.在工具 |选项 |文本编辑器 |C# |智能感知.

You can configure which characters being typed commit the current intellisense selection. In Tools | Options | Text Editor | C# | IntelliSense.

删除{"并确保不检查空格键提交的内容.

Remove "{" and ensure committed by the space bar is not checked.

注意.从 Visual Studio 2015 开始,此选项不再存在.

NB. This option is no longer present as of Visual Studio 2015.

这篇关于如何阻止 Visual Studio 插入“对象"?当我输入“new {"时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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