Essential Types C# Book

Letter Meaning
D Pad with leading zeros
using System;
using System.Text;
using System.Globalization;
class Sample
{
public static void Main()
{
Console.WriteLine("{0:D5}", 111);
Console.WriteLine("{0:D1}", 10);
}
}
The output:
00111
10
D is for integral types only.
D5 pads left to five digits and does not truncate.