Check the string have numeric value or not with out try catch

 in this article I will explain How to check if string have numeric string value or not with out using try catch block .It is very simple using following code
The string contain numeric value
int i;
string str= "10";
int.TryParse(str,out i);
console.WriteLine(i)

The result is show 10;


The string contain non numeric value
int i;
string str= "John";
int.TryParse(str,out i);
console.WriteLine(i)

The result is show 0;