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
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