Mega Code Archive

 
Categories / VB.Net Tutorial / Development
 

Catch divided by zero exception

Imports System   Module HelloWorld     Public Sub Main()       Try         Dim a as Integer = 10         Dim b as Integer = 10         Dim c as Integer = a/(a-b)       Catch ex as Exception         Console.WriteLine(ex.Message)       End Try     End Sub   End Module