private void button1_Click4(object sender, RoutedEventArgs e)
{
var resu = IsNumeric("1");
}
//利用正则
static bool IsNumeric(string str)
{
System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^[0-9]\d*$");
return reg1.IsMatch(str);
}