A cast is, by definition, changing the type of the object. tryparse is checking to see if a string contains the specific object in question. It seemed odd to me that this would work when I first read it, and since David has responded, and I've considered his reply, I would tend to agree. The docs must be wrong. You should use double.tryparse if the number could be floating point, then you can cast to int.