Is there any way to get the number of digits in an integer? For example:
int a = 12345;
I want to determine that a has 5 digits
int a = 12345;
int length = a.ToString().Length; // returns 5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With