一、是否纯数字
private bool IsNumeric(string str)
{
if (string.IsNullOrEmpty(str))
{
return false;
}
bool bResult = true;
foreach (char chr in str)
{
if (chr < '0' || chr > '9')
{
bResult = false;
break;
}
}
return bResult;
}
一、是否纯数字
private bool IsNumeric(string str)
{
if (string.IsNullOrEmpty(str))
{
return false;
}
bool bResult = true;
foreach (char chr in str)
{
if (chr < '0' || chr > '9')
{
bResult = false;
break;
}
}
return bResult;
}