I need to get the left hand side integer value from a decimal or double. For Ex: I need to get the value 4 from 4.6. I tried using Math.Floor function but it\'s returning a
If you just need the integer portion of a number, cast the number to an int. This will truncate the number at the decimal point.
int
double myDouble = 4.6; int myInteger = (int)myDouble;