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 193 views
1 answer 290 views
1 answer 155 views
155 views asked Nov 16, 2021 by avibootz
1 answer 163 views
1 answer 140 views
1 answer 111 views
...