判断字符串是不是数字!

  public bool regexyn(string lsstr)
  {
   Regex r=new Regex(@"^\d+(\.)?\d*$");
   if(r.IsMatch(lsstr))
   {
    return true;
   }
   else
   {
    return false;
   }
  }
原文地址:https://www.cnblogs.com/tohen/p/491126.html