/// <summary>
/// 1. 校验正整数(包含0)
/// </summary>
public static bool isInterger(string str)
{
return string.IsNullOrWhiteSpace(str) ? false:Regex.IsMatch(str, @"^[1-9]d*|0$");
}
/// <summary>
/// 2. 校验非零正整数
/// </summary>
public static bool isIntergerNonZero(string str)
{
return string.IsNullOrWhiteSpace(str) ? false : Regex.IsMatch(str, @"^[1-9]d*$");
}