How to convert double to uinteger in VB.NET

1 Answer

0 votes
Imports System
				
Public Module Module1
	Public Sub Main()
		Dim dbl As Double = 389.49
		Dim ui As UInteger = CUInt(dbl)
		Console.WriteLine(ui)
		
		dbl = 389.5
		ui = CUInt(dbl)
		Console.WriteLine(ui)
		
	End Sub
End Module




' run:
'
' 389
' 390
'

 



answered Nov 15, 2021 by avibootz

Related questions

1 answer 176 views
1 answer 125 views
1 answer 267 views
1 answer 166 views
1 answer 142 views
1 answer 112 views
...