Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search only get or set references for property in VS2010?

I use VS 2010 and C#. When I want to found all references to the methods or properties I press Shift+F12. It's possible to find only get or set references for examined property.

It's possible? Maybe I should install any extension?

like image 635
Jacek Avatar asked Jun 21 '12 14:06

Jacek


2 Answers

The poor man's way is to simply remove/comment-out either the getter or setter and recompile: all the errors will be your references. ;)

EDIT: Instead of deleting it (which could be invalid syntax), change the visibility of the particular get/set to private.

like image 96
Chris Sinclair Avatar answered Nov 17 '22 20:11

Chris Sinclair


I would suggest you to evalutate the ReSharper product which has extremely powerful features that enhance Visual Studio a lot.

Find Usages is what you are looking for.

If you find the ReSharper to be ok (and you will!) then go ahead and buy a license after evaluation.

Just make sure to try it out at least!

like image 4
maba Avatar answered Nov 17 '22 21:11

maba