int i = 100; Console.WriteLine(i.ToString("D6"));
int i = 100; Console.WriteLine(string.Format("{0:D6}", i));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)