how to check if string can be converted to int csharp

Code Example - how to check if string can be converted to int csharp

                
                        string test="123";
int i;
bool isDecimal=int.TryParse(test, out i)