void MagicalFunction(MagicalType magic)
{
...
magic.Poof("something");
...
var foo = magic.GetFoo();
...
}
Pressing the hotkey on variable magic
would navigate to definition of type MagicalType
.
Pressing the hotkey on foo
would go to definition of type Foo
which is not directly visible here because of type-inference.
Resharper plugin has this functionality (called Go To Type of Symbol
) , but is there a built-in alternative or a free-extension that does this?
Right click on the "var" keyword, select "Go to definition" from context menu, and it will take you to the type definition of the inferred type of the variable. I have some tools installed, like Productivity Power Tools which were mentioned, so not sure if this option is available through clean VS2015.
Edit:
You can also with cursor on the "var" keyword press Ctrl-F12 (Go to Implementation), if you prefer to use keyboard. Ref: https://www.youtube.com/watch?v=xWcQhF-1hxA
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With