c# long number of digits code example
Example 1: how to find how much digits in number c#
Math.Floor(Math.Log10(n) + 1);
//find how much digit in number
//decimal point will not be added
Example 2: validate int have 3 digits c#
int X = 9;
string PaddedResult = X.ToString().PadLeft (3, '0'); // results in 009