Take a look at this page, esp. the "Custom number formatting" section.
To show a number as two digits only you'd do something like this:
int x = 2;
string output = string.Format("{0:00}", x);
Console.WriteLine(output);
Take a look at this page, esp. the "Custom number formatting" section.
To show a number as two digits only you'd do something like this:
int x = 2;
string output = string.Format("{0:00}", x);
Console.WriteLine(output);