Reference Highlighting

I’m going to like the new Reference Highlighting in the 2010 code editor. This is like an in place version of the find all references feature.

To enable/disable this feature:

For C# Go to  Tools > Options >Text Editor > C# > Advanced
                        Check “Highlight references to symbol under cursor”

For VB Go to Tools > Options >Text Editor > Basic > VB Specific
                         Check “Enable highlighting of references and keywords”

Once enabled (which is the default in Beta 2) place your cursor on almost any symbol and all other references to that symbol will become highlighted.

image

You can navigate between the highlighted text using CRTL+SHIFT+UP ARROW or CRTL+SHIFT+DOWN ARROW

Symbols can include declarations, references, and pretty much anything else that Find All References would return. Including classes, objects, variables, methods, and properties.

In Visual Basic, this also includes: Select Case, Case, End Select, If, Then, ElseIf, and End If.

For C# code, reference highlighting is not provided for the switch and if constructions, but is provided for other symbols.