0

Codelens in Visual Studio is great, but I've inherited a code base where some methods are invoked via reflection.

This is a simplified sample.

...
if (method.Name.EndsWith("UpdatePlatformModel");
     method.Invoke(element, parameters)
...

enter image description here

In the attached image, the codelens states the method has 0 (zero) references. I understand that since this is invoked at runtime, the reference number won't reflect the number of times the method is called.

Is there a way via Visual Studio, a third party plugin, or any other strategy, where I can analyze the code to identify if a method is referenced or not?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Charlie P
  • 51
  • 2
  • 8

0 Answers0