How can I get a count of the total number of digits of a number in C#? For example, the number 887979789 has 9 digits.
Without converting to a string you could try
Math.Floor(Math.Log10(n) + 1);
1.4m articles
1.4m replys
5 comments
57.0k users