audiFanatic
audiFanatic

Reputation: 2524

Finding occurrences of a method or variable in Visual Studio

So I've been working with Visual Studio 2010 lately. While I'm not a huge fan of Eclipse, I do miss one feature: the fact that if you click on a function or variable in your code, it will mark all occurrences of that thing on the right frame of the text editor with a yellow or white rectangle. Does such a feature exist in Visual Studio? If not, is there a plugin out there that'll do this? I really don't want to resort to Find All every time I need to keep track where something is used.

Upvotes: 2

Views: 4787

Answers (3)

Yegor Korotetskiy
Yegor Korotetskiy

Reputation: 401

Highlight References is feature in Visual Studio 2010 for C# and VB only. Any time you place the blinking caret on a symbol, Visual Studio will automatically highlight all instances of that symbol for you You can actually cycle through these highlighted references – just use Ctrl+Shift+up arrow and Ctrl+Shift+down arrow to move to the previous or next highlighted symbol.

Upvotes: 4

MakePeaceGreatAgain
MakePeaceGreatAgain

Reputation: 37113

The ProductivityPowerTools is what you may need. There you have a bar where you can see a minimized view of all your code. If you click there you can also navigate your code. But if you click within your actual code on a member, all occurences of this member are shown in the map.

enter image description here

Upvotes: 1

user3240530
user3240530

Reputation:

Press Ctrl-K then Ctrl-R, this will find all references to the method (or object, variable, etc.)

Upvotes: 0

Related Questions