Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop Visual Studio from inserting "object" when I type "new {"

When editing a C# source file, I type

new {

Visual Studio auto-corrects it to

new object{

Is there a way to stop this behavior?

like image 348
Aidan Ryan Avatar asked Apr 04 '09 15:04

Aidan Ryan


People also ask

How to on IntelliSense in Visual Studio?

To access this options page, choose Tools > Options, and then choose Text Editor > C# > IntelliSense.

How IntelliSense works?

IntelliSense is a code-completion aid that includes a number of features: List Members, Parameter Info, Quick Info, and Complete Word. These features help you to learn more about the code you're using, keep track of the parameters you're typing, and add calls to properties and methods with only a few keystrokes.


1 Answers

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.

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

like image 177
Richard Avatar answered Sep 28 '22 07:09

Richard