How to Add leading zero to the C# number string

Adding leading zero to the the c# number string is incredibly easy. You only have to type the following to get the leading zero.

 

month month_no = 3;
Console.WriteLine( $"The month is : {month_no:D2}." );