Developing on Staxmanade

Go to Definition Tip with the C# ‘var’ keyword

This may be totally obvious to the masses out there, and it isn’t much of a tip, other than to say it works

Did You Know?

F12 (Go To Definition) – works on the C# var keyword?

(That’s all there is to this post – the rest is just rambling)

I hit it on accident the other day (yes I know, F12 isn’t exactly in the usual path of accidental keystrokes, trust me it was on accident). It brought Visual Studio to a screeching halt. That is, while VS was trying to load the object browser, and satellites were linking up in outer space trying get some message sent through the Pony Express about a tweetup with the Add Reference Dialog. (Point being – loading the object browser is REALLY SLOW)

It dawned on me that the F12 (Go To Definition) keyboard shortcut works on the var keyword.

Usually I just use the tool tip window when I don’t have time to decipher why the variable’s naming isn’t clear. (good post on the subject)


FYI: for those R# fans, who noticed after installing it, you lost the code metadata window in C# when F12ing it (Go To Definition). They’ve fixed it in the upcoming version So my satellites/pony express/tweetup/add ref dialog comment above won’t be an issue anymore. Yippee!