The old IsNumeric function is still available in .NET
Add a reference to Microst.Visualbasic and use the Information.IsNumeric function.
e.g.
using Microsoft.VisualBasic;
Code:
private void button1_Click(object sender, EventArgs e) {
string s = "1";
if (Information.IsNumeric(s)) {
MessageBox.Show("yes it's a number");
}
}
P.S. I know this is a 7 year old thread, but, this page is the first one that appears if you Google for C# IsNumeric and it does not have a correct answer. Just trying to fight pollution of the internet.