The pitfall of working with string representations is the locale used and yoou have to take care of rounding issues. 0.999999999 can be considered to be integer 1 in most cases. Here is a small snippet taking into account rounding errors:
Math.Abs(number - Math.Round(number)) < EPSILON
where EPSILON is a double value that is small enough for your purpose 0.00001 for example
See also this for some more information: http://msdn.microsoft.com/en-us/library/system.double.epsilon.aspx