Link to home
Start Free TrialLog in
Avatar of volking
volking

asked on

Divide-by-Zero is NOT ERROR?

On my PC ...in VB.net ... the below does NOT return an error??????
        Try
            Dim x As Single = 0
            x = (1 / 0)
        Catch ex As Exception
            Dim s As String = ex.ToString()
        End Try

Open in new window

Avatar of AngryBinary
AngryBinary

.NET gives you the correct answer for divide by zero: "Infinity".
ASKER CERTIFIED SOLUTION
Avatar of AngryBinary
AngryBinary

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of volking

ASKER

I looked it up.
Weird ... but OK, you're right.