判断是不是数字 public static bool IsNum(String str) { for(int i=0;i<str.Length;i++) { if(str[i]<'0' || str[i]>'9') return false; } return true; }