Drop fractional part of a number?

D

Dragon

Helo,

There're so many methods for rounding in .NET, but I can't find any that
will just drop fractional part of a number, e.g: -3.9 => -3.

I tried:

CInt(-3.9)
Int(-3.9)
Math.Round(-3.9)
CType(-3.9, Integer)
Convert.ToInt32(-3.9)

But the all return me -4.

In C# it's simple: (int)-3.9 = -3. Is there any method to do this in VB.
NET?

Thanks.

Roman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top