How do I cast a string to an int, float, double, etc? - The C# Team - Site Home - MSDN Blogs
MSDN article: "How to: Determine Whether a String Represents a Numeric Value (C# Programming Guide)". msdn.microsoft.com/.../bb384043(v=VS.90).aspx In short, this is what Microsoft suggests: int i = 0; string s = "108"; bool result = int.TryParse(s, out i...