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.
Assuming your question was referring to an int, the following works for negative/positive and zero as well:
Math.Floor((decimal) Math.Abs(n)).ToString().Length