Checking if Input.inputString is a number

Hello, I would like an if statement that checks if a number has been input.

if(Input.inputString!=null)
		{
			input += Input.inputString;
		}

Instead of checking if its null is there a (quick) way of checking if the input has been a number from either above the qwerty or the alpha key pad?

Thanks

You can use

int.TryParse();

or

float.TryParse();

Let me know if you need clarification on how to use it.

if you don’t need the numeric value (only check), you can use the discard symbol _

string numString = "1122";

if (int.TryParse(numString, out _))
{
    //Do something
}