Exponent
Exponent

Reputation: 94

Visual Studio 2015 (VB.NET) IntelliSense not showing variables, methods and properties

Up to now IntelliSense listed all public variables, methods and properties of a class, when I used the name somewhere else, but now it only shows a few properties and methods. The problem also occurs with forms and other controls.

There is a post, which dealed already with this issue (link to the post), but it does not provide a working solution. Maybe someone knows the reason for this behaviour.

Edit: Here is a screenshot with an example:

Screenshot

Upvotes: 2

Views: 837

Answers (1)

Bradley Uffner
Bradley Uffner

Reputation: 16991

From your screenshot the problem is easier to spot. You are using the Default Instance of a form. As Hans said, intellisense not displaying here is a probably a minor bug that Microsoft will likely not fix. Your code is easier to fix however. Don't use the default instance; it should look like this:

dim f as new Form1
f.Sub1 '<--- should get intellisense here now.

You should avoid using default instance of forms. In my experience, they cause nothing but problems. Creating a form instance, storing it in a local variable or field, and passing those references around is easy enough. It's also a much better practice that will make your code stronger overall.

Upvotes: 2

Related Questions