c check if input contains only digit code example
Example: c# how do you check if a string contains only digits
if (str.All(char.IsDigit)) {
Console.WriteLine("This string only contains numbers");
}
if (str.All(char.IsDigit)) {
Console.WriteLine("This string only contains numbers");
}