Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happened to Intellisense for enum types in Visual Studio 2010 using VB.NET?

I am using Visual Studio 2010 Prof.

In C# I can create my own Enumerator and use it like this:

MyEnum value = 

Now, Intellisense will suggest a value of MyEnum.

In VB, when I write:

Dim value As MyEnum = 

I get a huge list of every types. When starting to write my enumerator value (could be a word like "sunny") it filters out some types but I would like to have it like in C#. Anyway I will use the MyEnum type and no "String nor Objecte nor IntPtr...".

Any idea?

Screenshot

Also I made a short video: Video with sample (new)

Regards

like image 775
goldengel Avatar asked Apr 27 '11 10:04

goldengel


People also ask

How do I refresh IntelliSense code in Visual Studio?

You may Ctrl+Shift+P or F1, then write "reset.." in command pallete, and choose in popup list "C/C++ Reset IntelliSense database".

How do I enable IntelliSense in Visual Studio?

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

Why is IntelliSense not working Visual Studio?

If you find IntelliSense has stopped working, the language service may not be running. Try restarting VS Code and this should solve the issue. If you are still missing IntelliSense features after installing a language extension, open an issue in the repository of the language extension.


2 Answers

Simple, all you have to do is click the "Common" tab at the bottom of the Intellisense drop-down.
To prove it, here's a screenshot of what I see in VS 2010, immediately after typing =:

But, even if you have the "All" tab selected, the values defined in the enum will still be automatically displayed first, and even appear grouped together. You will indeed see all possible members and types, even those that are completely unrelated, but it's still pretty easy to find the ones you want.

And no, I'm not using any third-party add-ins or extensions to achieve the demonstrated feat. As best I can tell, I also haven't reconfigured any relevant options from the default settings.

like image 166
Cody Gray Avatar answered Sep 19 '22 19:09

Cody Gray


This is a documented issue in VS 2010, pre-SP1. See: https://connect.microsoft.com/VisualStudio/feedback/details/551699/intellisense-enum-values. It has been fixed in SP1. If you can't install SP1, the only workaround is to use the mouse or Alt + , to switch from the "All" to the "Common" tab.

like image 44
Todd Main Avatar answered Sep 21 '22 19:09

Todd Main