static bool IsNumeric(string str)
{
if (str == null || str.Length == 0)
return false;
foreach (char c in str)
{
if (!Char.IsNumber(c))
{
return false;
}
}
return true;
}