代码
    public static bool IsNumeric(string str
    { 
        
if (str == null || str.Length == 0)                
            
return false;
        System.
Text.ASCIIEncoding ascii = new System.Text.ASCIIEncoding(); 
        byte
[] bytestr = ascii.GetBytes(str); 
        foreach (byte c 
in bytestr) 
        { 
            
if (c < 48 || c > 57
            { 
                
return false; 
            } 
        } 
        
return true; 
    }

 

相关文章:

  • 2021-12-16
  • 2022-12-23
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
猜你喜欢
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案