how to check if a character is a digit in c# 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");
}