I'm trying to check if a string is a valid number or not. But this returns false. Why.
int IsNumber;
var parsed = int.TryParse("9876543210", NumberStyles.Number, null, out IsNumber);
if (parsed)
{
}
else
{
}
Also tried with CultureInfo.CurrentCulture.NumberFormat, instead of null.
When debugging, it never hits inside the if condition.
longdoesn't cover the range you want, look atBigInteger...int.Parseand inspect the exception.