I am having an string like this
string str = \"dfdsfdsf8fdfdfd9dfdfd4\"
I need to check whether the string contains number by looping through the array.
What about a regular expression:
bool val = System.Text.RegularExpressions.Regex.IsMatch(str, @"\d");
Combining parts of Kamals answer and Tristars answers give...
str.Any(char.IsNumber)
which I think is the most succinct and readable way, instead of a regex