I am using C# 3.5 and Linq. I have ReSharper 6.1 on VS 2010.
For example, if I enter the following statement in the code editor:
var result = dataContext.Items.Select(i => new {Name = i.ItemName});
As soon as I type the new {
it auto-completes to new string{}
. Actually, not sure if it is always string
or depends on the lambda. But I find I always need to delete it and back up. This happens whenever I am declaring anonymous types in a lambda.
What setting in ReSharper or VS do I need to change in order to be able to enter anonymous types using the above syntax without that occurring? Preferably, I would like to retain auto-completing in all other situations, just not this particular one as it is making an incorrect assumption as to my intent.
Resharper 6.1 added a new feature to control the way the intellisense autopopups act. Go to ReSharper->Options->Environment->IntelliSense->Autopopup and change the "After 'new'" setting to "Display but do not preselect".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With