pdizz
pdizz

Reputation: 4240

Search project for where class is instantiated

Is there a tool in visual studio 2010 to scan a project and find out where a specific class is instantiated?

Upvotes: 1

Views: 504

Answers (2)

Chris Wyatt
Chris Wyatt

Reputation: 142

I realise this was asked a long time ago but I'm adding this in case someone stumbles across this in a search engine looking something similar.

If you have ReSharper you can use Find Usages (Shift-F12 by default) and then you can filter by type of usage in the results. New instance creation is one such filter which is likely to find all cases of instantiation (reflection aside).

Upvotes: 1

Jim G.
Jim G.

Reputation: 15365

Shift + F12 will find all usages.

Simply select or move the cursor onto a type and press “Shift + F12”:

Upvotes: 2

Related Questions