What does the Integer.TryParse method do? Have you checked? If not then I suggest that you do because you can probably work it out for yourself. That would be preferable, would it not? My philosophy is "try first, then ask if you fail". I tend to offer guidance rather than outright solutions in many cases in the hope that others will do the same.