Mega Code Archive

 
Categories / VB.Net Tutorial / Data Type
 

Catch OverflowException

Public Class Example     Public Shared Sub Main()         Dim value As String                  value = Double.MaxValue.ToString()         Try            Console.WriteLine(Double.Parse(value))         Catch e As OverflowException            Console.WriteLine("{0} is outside the range of the Double type.", value)         End Try  End Sub End Class