You can convert a string to a number by using methods in the xref:System.Convert class or by using the TryParse method found on the various numeric types (int, long ...