0

I have a class Blah<T> and I would like to see all specialized uses of Blah, that is, all classes T's such that Blah<T> is used.

As I use visual studio (2019) I could obviously search for "Blah<" or do something fancier with regular expressions (this would potentially list multiple times a same use though), but is there rather by chance a visual studio 2019 functionality allowing for that, or a resharper one for doing the same ? (I am using resharper 2019.2.3.)

Olórin
  • 3,367
  • 2
  • 22
  • 42
  • The `XX References` button above the class? – DetectivePikachu Nov 15 '19 at 16:39
  • I don't have this button. – Olórin Nov 15 '19 at 16:40
  • 1
    If you have Visual Studio you have it. Its a link right above the `public class B....` Shortcut is put cursor on class name and hit `Alt + 2`. Or right click on class name and use `Find All References` – DetectivePikachu Nov 15 '19 at 16:40
  • just worth mentioning the _link above class_ is from what is called `CodeLens` and it is available to all edition of Visual Studio as of 2019 which is not true for previous years where community edition did not have it. You and check [this answer](https://stackoverflow.com/a/57094372/2748412) on how to enable codelens. You certainly have loaded an older version profile or Visual Studio as it's on by default. – Franck Nov 15 '19 at 16:46
  • As well as code lens, using Find All References from the context menu will also list all cases. – Richard Nov 15 '19 at 16:51
  • Resharper's Shift+F12 shortcut? – aybe Nov 15 '19 at 19:07
  • I actually wasn't able to see the references in questions even after activating them. I repaired the Vs install and it worked after. Thx also for the resharper pointer ! – Olórin Nov 15 '19 at 20:46

0 Answers0