This expression is vacuously true .
All characters are numbers because you cannot find a counter example. This code:
return s.All(char.IsDigit);
roughly equivalent to this loop:
foreach (char c in s) { if (!char.IsDigit(c)) { return false; } } return true;
In this rewritten version, it should be clear that if there are no characters in the string, the loop body will never be entered and the result will be true.
source share