Mega Code Archive

 
Categories / VB.Net Tutorial / Data Type
 

CByte

Module Tester     Public Sub Main()         Dim iInteger As Integer = 5280         Dim lLong As Long         Dim bytByte As Byte         Dim sngSingle As Single         Dim dblDouble As Double         Dim decDecimal As Decimal         Console.Writeline("Convert to a Byte: {0}", CByte(iInteger))     End Sub End Module Unhandled Exception: System.OverflowException: Arithmetic operation resulted in an overflow. at Tester.Main()