Exceptions are not raised
- From: Giuseppe Chielli <giuchiel@xxxxxxxxxxxxxxx>
- Date: Wed, 05 Apr 2006 09:06:26 GMT
Hi to everyone. I am studying VB.net and I am wondering why this trivial code doesn't raise any exception:
Option Strict On
Imports System
Imports Microsoft.VisualBasic
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim num1, num2 As Short
Dim num3 As Double
num1 = 5
num2 = 0
Try
num3 = num1 / num2
Catch ex As DivideByZeroException
MsgBox("Divisione per 0!")
End Try
End Sub
End Class
No msgbox is executed!!!
I'm using VB 2005 Express Edition.
Should I set anything in the framework or project properties?
Thanks in advance to everyone.
Giuseppe from Italy.
.
- Follow-Ups:
- Re: Exceptions are not raised
- From: R. MacDonald
- Re: Exceptions are not raised
- From: Kevin Spencer
- Re: Exceptions are not raised
- Prev by Date: ZIPCODEWORLD.COM Releases United States and Canada Store Locator .NET Web Control
- Next by Date: Re: VS.NET 2005 Beta2 and .NET Framework 2.0 release !
- Previous by thread: ZIPCODEWORLD.COM Releases United States and Canada Store Locator .NET Web Control
- Next by thread: Re: Exceptions are not raised
- Index(es):
Relevant Pages
|