Question

Currently I have a Double which looks like 12.53467345 .. Now I would like to remove the numbers after the dot so i just get "12" , how could i do this? I guess with TryParse, but don't really understand how to do it.

Thanks!

Was it helpful?

Solution

System.Math.Floor()

Ref.

OTHER TIPS

or use the Int() function.

' This code requires Option Strict Off
Dim MyNumber As Integer
MyNumber = Int(99.8)

MSDN Ref

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top