How to search for all event subscriptions in a project?

Viewed 25

I want to search for and get a list of all event subscriptions, from any event of any object, in my Visual Studio C# project code. Similar to how you could use "Find All References" or simply Ctrl+F to search for many other kinds of things. Is there a way to achieve this?

All my event subscriptions use the simplified "event += method" syntax, so it would not work to search for the string "new EventHandler" or something similar, and simply searching for "+=" would of course return tons of unrelated arithmetic code.

1 Answers

There is no option to search for the subscribed methods, because it becomes a subscriber at runtime. You could try to use Ctrl+F again and try to use something like "event +=", or mayby only the last letters of your event.

Related