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
Use the int.TryParse method.
string x = "42"; int value; if(int.TryParse(x, out value)) // Do something
If it successfully parses it will return true, and the out result will have its value as an integer.