VB.NET
Public Shared Function Truncate(number as Double) As Integer
dim b as integer
b = number - (number - Math.Floor(number))
return bEnd Function
dim b as integer
b = number - (number - Math.Floor(number))
return bEnd Function
C#
public int Truncate(double number)
{
int b;
b = number - (number - Math.Floor(number));
return b;
}
{
int b;
b = number - (number - Math.Floor(number));
return b;
}