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 173 views
1 answer 239 views
1 answer 143 views
143 views asked Nov 16, 2021 by avibootz
1 answer 143 views
1 answer 126 views
1 answer 100 views
...