public static long Length(this long number)
        {

            long length = 0;

            if (number < 10 && number >= 0)
            {
                length = 1;
                return length;
            }

            number = Math.Abs(number);

            while (number > 0)
            {
                length += 1;
                number = number / _base;
            }

            return length;
        }

Test Case

Length of number 123 is  3

Length of number 1234567890 is  10

Length of number -123456 is  6

Length of number 9 is  1

Length of number 545 is  3

Length of number 123454321 is  9

Length of number -123454321 is  9