Tag: Leading Zeroes

How to Print Leading Zeroes for a Number in C# ?

The Leading Zeroes for a number can be printed using the format string “D” in .NET . Below is a sample code snippet that demonstrates printing of 3 leading zeroes for a number 5 digit number in C#. How to Print Leading Zeroes for a Number in C# ?