Mega Code Archive

 
Categories / VB.Net Tutorial / Data Type
 

CSng

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 Single: {0}", CSng(iInteger) / 3.4)     End Sub End Module Convert to a Single: 1552.94117647059