What about
You'd be casting the number to integer (removing fractions), then back to float to have the same data type for comparing. If your original number is greater than your truncated one, you have a fraction.Code:bool isNotInteger = (number > (float)((int)number);
Would that work?




Reply With Quote