Working with .NET Exception Classes


.NET includes a large number of built-in exception classes. Microsoft recommends you use these exception classes when you can and create new exception classes only when you need to throw an exception that does not exist. To get a list of all of the .NET Framework exception classes, select Debug Exceptions. You will see a dialog box similar to Figure 5-1.

click to expand
Figure 5-1: .NET Framework Exceptions dialog box

The Exceptions list may be slightly different depending on the languages you added during installation. Expanding the Common Language Runtime Exceptions list item and then the System item displays a tree that looks like Figure 5-2.

click to expand
Figure 5-2: Common Language Runtime Exceptions list

Using this dialog box, you can search for all different types of .NET exceptions. Get to know this list; it will cut down on your development time because you will not be duplicating exceptions that already exist.




Building Client/Server Applications with VB. NET(c) An Example-Driven Approach
Building Client/Server Applications Under VB .NET: An Example-Driven Approach
ISBN: 1590590708
EAN: 2147483647
Year: 2005
Pages: 148
Authors: Jeff Levinson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net