if (str.All(char.IsDigit)) { Console.WriteLine("This string only contains numbers"); }
if (str.All(char.IsDigit)) { // String only contains numbers }