how to find length of a number in c# code example
Example 1: string length c#
string name = "Anthony";
int nameLength = name.Length;
Console.WriteLine("The name " + name + " contains " + nameLength + "letters.");
Example 2: validate int have 3 digits c#
int X = 9;
string PaddedResult = X.ToString().PadLeft (3, '0'); // results in 009