if (str.All(char.IsDigit)) { // String only contains numbers }
var isNumeric = int.TryParse("123", out int n);
bool *name* = int.TryParse(*name2*, out int n);