Class Sample
Public Shared Sub Main()
Dim lNumber As Long = 2010
Try
Dim number1 As Integer = CInt(lNumber)
Console.WriteLine(number1)
Catch e As OverflowException
Console.WriteLine("{0} is out of range of an Int32.", lNumber)
End Try
End Sub
End Class