top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to remove digits after decimal in vb.net?

+2 votes
611 views

How to remove digits after decimal in vb.net?

if value is 1.9 i want 1
if value is 1.1 i want 1

posted Apr 9, 2014 by Muskan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

If you convert a Double to ULong in vb.net then it will remove all the digits are decimal, in this way you can get the desired result.

Dim vIn As Double = 1.9
Dim vOut As ULong = Convert.ToUInt64(vIn)
answer Apr 10, 2014 by Salil Agrawal
Similar Questions
+2 votes

How to remove decimal from currency datatype?

+5 votes

How to change postion if a contrl at runtime in vb.net?

+2 votes

how to change size of the panel dynamically vb.net

...