I am having an string like this
string str = \"dfdsfdsf8fdfdfd9dfdfd4\"
I need to check whether the string contains number by looping through the array.
If you're a linq junkie like me, you'd do it this way
string s = "abc1def2ghi"; bool HasNumber = (from a in s.ToCharArray() where a >= '0' && a <= '9' select a).Count() > 0;