Int.TryParse() returns false always
I have following code int varOut; int.TryParse(txt1.Text, out varOut); // Here txt1.Text = 4286656181793660 Here txt1.Text is the random 16 digit number generated by JavaScript which is an integer. But the above code always return false i.e. varOut value is always zero. What I am doing wrong here ? The limit for int ( 32-bit integer) is -2,147,483,648 to 2,147,483,647 . Your number is too large. For large integer number such as your case, try to Parse using long.TryParse (or Int64.TryParse since Int64 is long in C#) instead. The limit for long number is of the range of -9.2e18 to 9.2e18 * long