public static bool IsNum(string numstr)
{
if(numstr.Length==0)
return false;
Regex reg = new Regex("^\\d+$");
if(reg.Match(numstr).Success)
return true;
else
return false;
}
{
if(numstr.Length==0)
return false;
Regex reg = new Regex("^\\d+$");
if(reg.Match(numstr).Success)
return true;
else
return false;
}
double resNum;
bool isNum = Double.TryParse(
str,System.Globalization.NumberStyles.Float,
System.Globalization.NumberFormatInfo.InvariantInfo,
out resNum
);
return isNum;
}