Int32.MaxValue Field Represents the largest possible value of an Int32. This field is constant.
Imports System
Imports Microsoft.VisualBasic
Module MainClass1
Sub Main()
Dim numbersToConvert() As Long = {Int64.MaxValue - 1}
Dim newNumber As Integer
For Each number As Long In numbersToConvert
If number >= Int32.MinValue And number <= Int32.MaxValue Then
newNumber = Convert.ToInt32(number)
Console.WriteLine(newNumber)
Else
Console.WriteLine("Unable to convert")
End If
Next
End Sub
End Module