Is there a VS shortcut to see the class definition of a variable?

When I click Ctrl+ Left mouse buttonor F12on a variable, I get a variable declaration.

Is there such a shortcut to go on to defining a class like a variable? Therefore, when I have a variable string functionCode, I would like to click functionCodeanywhere in the program and immediately go to the object browser, showing me the class of strings.

Of course, this is most useful for self-defined classes and member variables. Sometimes I don’t see the type of an element in a method at all - everywhere is simple var. To get to the definition of a class, I have to get to the definition of a variable and from there to the definition of a class.

OK, it's all about keeping one click ... but I'm lazy ... is this possible?

PS: ReSharper is also welcome.

+5
source share
2 answers

The best way - to use a combination between the code page of the window and the definition of code: Ctrl+ W, D.

You can click on the code element and view it in the code definition window, then click on the base class in the code definition window and using F12it it will move your code page to the base class definition.

+4
source

I just realized that you can press the Ctrl+ Left mouse buttonor click F12in var-keyword too ...

0
source

All Articles