How to convert double to ulong in VB.NET

1 Answer

0 votes
Imports System
				
Public Module Module1
	Public Sub Main()
		Dim dbl As Double = 389.49
		Dim ul As ULong = CULng(dbl)
		Console.WriteLine(ul)
		
		dbl = 389.5
		ul = CULng(dbl)
		Console.WriteLine(ul)
		
	End Sub
End Module




' run:
'
' 389
' 390
'

 



answered Nov 15, 2021 by avibootz

Related questions

1 answer 185 views
1 answer 265 views
1 answer 149 views
149 views asked Nov 16, 2021 by avibootz
1 answer 157 views
1 answer 136 views
1 answer 107 views
...