views:

396

answers:

3

Hello,

I am using VB.NET. In Visual Studio, if I right-click a property name and click "Find All References", it searches for all instances of the property being used.

However, a property is always used either for assignment (Set method) or retrieval (Get method). Is there any way of searching for only one of these uses? e.g. search for all uses of the property in code where it is being assigned a value, not when the value is being retrieved.

Thanks.

+3  A: 

Use the compiler to turn what you want to find into errors. Remove the setter to find all the places were it was going to be used.

Hafthor
This is what I did when I'm on a machine that doesn't have Resharper's Find Usage.
jop
A: 

You can also use Reflector to browse through your assembly.

Franci Penov
Just make sure you have all the assemblies loaded :)
leppie
+1  A: 

Resharper (MSVS addin) has the exact feature you are looking for. Check:

ReSharper.FindUsages

or

ReSharper.FindUsagesAdvanced

in keyboard shortcuts mapping (Tools -> Options -> Keyboard) to find out what shortcut is used.

Dandikas