I\'m just curious as to whether there is something built into either the C# language or the .NET Framework that tests to see if something is an integer
if (x
For Wil P solution (see above) you can also use LINQ.
var x = "12345"; var isNumeric = !string.IsNullOrEmpty(x) && x.All(Char.IsDigit);