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 271 views
1 answer 419 views
1 answer 236 views
236 views asked Nov 16, 2021 by avibootz
1 answer 261 views
1 answer 213 views
1 answer 194 views
...