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
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