SyntaxFix
Write A Post
Hire A Developer
Questions
You could use char.IsDigit:
bool isIntString = "your string".All(char.IsDigit)
Will return true if the string is a number
true
bool containsInt = "your string".Any(char.IsDigit)
Will return true if the string contains a digit