In .NET what is the best way to find the length of an integer in characters if it was represented as a string?
e.g.
1 = 1 character 10 = 2 characters
If input is in range 0-10000
if (i < 10) return 1; if (i < 100) return 2; if (i < 1000) return 3; if (i < 10000) return 4; // etc