I would like to know what the easiest and shortest LINQ query is to return true if a string contains any number character in it.
"abc3def".Any(c => char.IsDigit(c));
Update: as @Cipher pointed out, it can actually be made even shorter:
"abc3def".Any(char.IsDigit);
1.4m articles
1.4m replys
5 comments
57.0k users