check if int contains digit 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");
}