Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / April 2005

Tip: Looking for answers? Try searching our database.

Examining Classes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott M. - 27 Apr 2005 23:55 GMT
Is there a VS.NET way to know what exceptions a class is capable of
throwing?
David Young - 28 Apr 2005 00:37 GMT
You can use Lutz Roeder's .Net Reflector
http://www.aisto.com/roeder/dotnet

It' works great and best of all, its free.

> Is there a VS.NET way to know what exceptions a class is capable of
> throwing?
Scott M. - 28 Apr 2005 02:10 GMT
No, sorry, I'm asking about anything built into VS.NET.

> You can use Lutz Roeder's .Net Reflector
> http://www.aisto.com/roeder/dotnet
[quoted text clipped - 3 lines]
>> Is there a VS.NET way to know what exceptions a class is capable of
>> throwing?
David Young - 28 Apr 2005 02:14 GMT
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.

> No, sorry, I'm asking about anything built into VS.NET.
>
[quoted text clipped - 5 lines]
> >> Is there a VS.NET way to know what exceptions a class is capable of
> >> throwing?
Scott M. - 28 Apr 2005 03:32 GMT
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.

> Perhaps I misunderstood your question then.  I suppose as a blanket
> answer,
[quoted text clipped - 10 lines]
>> >> Is there a VS.NET way to know what exceptions a class is capable of
>> >> throwing?
Stephany Young - 28 Apr 2005 04:40 GMT
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.

> 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
[quoted text clipped - 16 lines]
>>> >> Is there a VS.NET way to know what exceptions a class is capable of
>>> >> throwing?
Scott M. - 29 Apr 2005 15:38 GMT
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.

> What you are really being told is no.
>
[quoted text clipped - 24 lines]
>>>> >> Is there a VS.NET way to know what exceptions a class is capable of
>>>> >> throwing?
Patrice - 28 Apr 2005 14:28 GMT
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

> Is there a VS.NET way to know what exceptions a class is capable of
> throwing?
Jamin Guy - 28 Apr 2005 16:59 GMT
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...
Scott M. - 29 Apr 2005 15:39 GMT
> You'll find this though in the method documentation. There is a table with
> this information in the method description.

But not for custom classes.
Cor Ligthert - 29 Apr 2005 16:27 GMT
Scott,

Probably I understand you wrong, however build in is the object browser.

Cor
Scott M. - 29 Apr 2005 19:13 GMT
The OB doesn't provide an "automatic" way of listing exceptions of a class.
You must go digging through the class yourself.

> Scott,
>
> Probably I understand you wrong, however build in is the object browser.
>
> Cor

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.