C# control when a string contains 4 numbers 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);