For example I want to write a REST client. Instead of having a single catch statement for all the calls, I would like to know all the thrown messages and see if I can handle them.
It is really simple in Eclipse and Java. The problem is that for some of the methods, the signature and the doc doesn’t tell me all the Exceptions thrown.
C# doesn’t support ‘Checked Exceptions’ like Java has.
The only thing you can do, is rely on the documentation (MSDN, if the method in question is part of the .NET framework) …
And, even if C# should have checked exceptions, then, you still cannot extract from the signature all exceptions that the method could throw. It only mentions the exceptions that you have to catch, when calling the method.