Bad Dub
Bad Dub

Reputation: 1593

Using x in a lambda expression in Visual Studio 2019

This issue seems to only have creeped in in the last few weeks. When I use x in a lambda expression I used to be able to just do .Where(x => x.) and that would be fine.

But now when I do .Where(x and hit space it automatically puts in ConfigXmlDocument or X500DistinguishedName.

Has anyone else been experiencing this issue? If this isn't the right place for this type of question I apologies.

Upvotes: 3

Views: 220

Answers (1)

Federico Calvagna
Federico Calvagna

Reputation: 45

Go to Tools > Options > Text Editor > C# > IntelliSense

Find and disable the option "Show items from unimported namespaces (experimental)".

This option is actually very interesting as it will find out quickly classes and add the using automatically when you are typing, but when writing a lambda expression it is very annoying that it doesn't default to x or whatever variable you use.

Upvotes: 2

Related Questions