Reputation: 376
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?
Upvotes: 9
Views: 4024
Reputation: 528
According to this discussion thread, Microsoft changed the shortcut keys. The relevant settings are here
Upvotes: 3
Reputation: 674
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.
Upvotes: 1
Reputation: 1127
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).
Upvotes: 1