My Technical Notes

Friday, 30 August 2013

Padding an Integer using C#

Padding the Integer to eight characters:


int randomInt = 78;
Console.WriteLine(randomInt.ToString("D8"));

No comments: