C# 高效率判断字符串是否为存数字

比正则表达式的方式效率要高一些

  public static bool isNumberic( string _string)
        {
    
    
            if (string.IsNullOrEmpty(_string))
                return false;
            int i = 0;
            return int.TryParse(_string, out i);
        }

猜你喜欢

转载自blog.csdn.net/qq_42455262/article/details/116458637