public bool isNaN(string temp) {

            for (int i = 0; i <temp.Length; i++)
            {
                byte tempByte = Convert.ToByte(temp[i]);   //设置byte格式
                if ((tempByte<48) || (tempByte>57))   //如果改tempByte不在范围内
                {
                    return false;
                }
                
            }

            return true;
        }

返回的是false格式不合法,否则就是合法的!!!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
  • 2022-02-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-07
  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
相关资源
相似解决方案