8

So, when I use auto keyword in VS2015 with something simple, like this:

As you can see, it shows the variable's type, but, when I try something a bit more complex (or defined in another file?), it freaks out and gives me some not-so-useful information:

Although VS is still able to determine top's type:

So, I wonder if there is a way to make this wonderful IDE show those complex/defined somewhere else types?

ARentalTV
  • 344
  • 1
  • 12

3 Answers3

3

According to this discussion thread, Microsoft changed the shortcut keys. The relevant settings are here enter image description here

Kargath
  • 450
  • 5
  • 15
1

At our company, we use the Visual Assist extension (not free unfortunately, but understandably). It can find the class for the auto keyword when you choose "Goto implementation" (Alt+G).

jciloa
  • 1,039
  • 1
  • 11
  • 22
1

vs2022 now supports pressing ctrl twice to display the actual type represented by auto.

If you are using Visual Assist on Visual Studio 2022 double ctrl (mentioned by @Kargath) will not work.

Press Alt + F1 to display the hidden types.

Adam Kuzański
  • 509
  • 4
  • 12