VB.Net Tutorial/Data Type/Short
Версия от 16:40, 26 мая 2010; (обсуждение)
MinValue and MaxValue of Short
public class Test
public Shared Sub Main
Dim sNum As Short
Console.WriteLine("Short: " & sNum.MinValue & " to " & sNum.MaxValue)
End Sub
End class
Short: -32768 to 32767
Short Overflow
Module Module1
Sub Main()
Dim Value As Short = 32767
Value = Value + 1
End Sub
End Module
Unhandled Exception: System.OverflowException: Arithmetic operation resulted in an overflow. at Module1.Main()