How can I determine which exceptions can be thrown by a given method?

前端 未结 9 981
感情败类
感情败类 2020-11-30 22:41

My question is really the same as this one \"Finding out what exceptions a method might throw in C#\". However, I would really like to know if anyone knows of a way to deter

9条回答
  •  -上瘾入骨i
    2020-11-30 23:02

    This isn't so much an answer as building on top of the great work done by @Noldorin above. I used the code above and figured it would be really useful to have a tool that a developer could point at an arbitrary assembly/dll and see the list of exceptions thrown.

    By building on top of the work above, I built a tool which does exactly that. I shared the source on GitHub for anybody interested. It's super simple I only had a couple of hours free to write it but feel free to fork and make updates if you see fit...

    Exception Reflector on Github

提交回复
热议问题