Examining Classes

  • Thread starter Thread starter Scott M.
  • Start date Start date
Perhaps I misunderstood your question then. I suppose as a blanket answer,
I could say that you can use the System.Reflection namespace to find out
just about anything you want to know about a managed assembly.
 
Thanks, but no. I'm asking if there is a function of VS.NET that can give
me this information. I understand that I can use programmatic syntax using
reflection to get this information, but I want to know if there is something
in the IDE that can provide me with a list of the exceptions that a class is
capable of throwing.
 
What you are really being told is no.

You have to understand that exceptions are thrown in code. To find them you
have to dissect the code.

If you do not want to write a dissector (using reflection) yourself, then
you will need to use a dissector that someone has written.
 
Unlike Java you don't declare what exceptions could be thrown. As a result
you likely won't find this in .NET (other by than by dissecting the code as
mentioned by Stephany).

You'll find this though in the method documentation. There is a table with
this information in the method description.

Patrice
 
The documentation on this is sparse to say the least. I'm not familiar
with the declarative manner in which Java exposes exceptions, but from
what I gather it would be cool if .Net ()'s did the same...
 
I do understand what you have said. I simply wanted to know if VS.NET had
such a "dissector" available as an IDE feature that perhaps I hadn't
stumbled across.
 
The OB doesn't provide an "automatic" way of listing exceptions of a class.
You must go digging through the class yourself.
 
Back
Top