.NET Tips and Tricks

Blog archive

Finding Where a Method, Property, or Variable Is Used

I think everybody knows that if you click on a variable, method, or property name and press F12 (or select Go To Definition from the pop-up menu) you'll be taken to the method or property's code or to the variable's declaration. But sometimes you want to see the reverse: All the places where a property, method, or variable is being used -- and not everyone seems to know about that.

That's too bad because it's a cool feature of Visual Studio: Just click on a method (or property or variable), press Shift+F12 (or select Find All References) and Visual Studio opens a new window below the editor window, listing all the places where the method is used. If you double-click on one of the items in the list, you'll be taken to the code. With that list, therefore, you can step through all the places in your application that you might want to look at to understand how the method is used (the definition of the method appears at the top of the list, by the way, so you can go there, also).

The Window stays visible until you close it or do something that moves another window in the group to the top (building your application pops the output window over the list, for example). The Window is still there if you want to go back to it, however: It's called Find Symbol Results.

Posted by Peter Vogel on 12/04/2014


comments powered by Disqus

Featured

  • Microsoft Revamps Fledgling AutoGen Framework for Agentic AI

    Only at v0.4, Microsoft's AutoGen framework for agentic AI -- the hottest new trend in AI development -- has already undergone a complete revamp, going to an asynchronous, event-driven architecture.

  • IDE Irony: Coding Errors Cause 'Critical' Vulnerability in Visual Studio

    In a larger-than-normal Patch Tuesday, Microsoft warned of a "critical" vulnerability in Visual Studio that should be fixed immediately if automatic patching isn't enabled, ironically caused by coding errors.

  • Building Blazor Applications

    A trio of Blazor experts will conduct a full-day workshop for devs to learn everything about the tech a a March developer conference in Las Vegas keynoted by Microsoft execs and featuring many Microsoft devs.

  • Gradient Boosting Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the gradient boosting regression technique, where the goal is to predict a single numeric value. Compared to existing library implementations of gradient boosting regression, a from-scratch implementation allows much easier customization and integration with other .NET systems.

  • Microsoft Execs to Tackle AI and Cloud in Dev Conference Keynotes

    AI unsurprisingly is all over keynotes that Microsoft execs will helm to kick off the Visual Studio Live! developer conference in Las Vegas, March 10-14, which the company described as "a must-attend event."

Subscribe on YouTube