How to: Throw an Exception in Visual Basic
This example throws anexception.
This code example is also available as an IntelliSense code snippet. In the code snippet picker, it is located in Visual Basic Language. For more information, see.
Compiling the Code
This example requires:
A reference to thenamespace.
Unhandled exceptions can cause application execution to halt. Use Try…Catch blocks to anticipate and handle possible exceptions.