function for string just contains numbers c# code example
Example: if string contains number c#
"abc3def".Any(c => char.IsDigit(c));
// Or to make it shorter:
"abc3def".Any(char.IsDigit);
"abc3def".Any(c => char.IsDigit(c));
// Or to make it shorter:
"abc3def".Any(char.IsDigit);