The .ToString() function have multiple formats you can choose from (on any numeric type).
Format Digits
Will add '0' prefix based on D#.
var number = 8;
var formattedNumber = number.ToString("D2");
Console.WriteLine(formattedNumber); // Output: 08
Seperator
var number = 123456789;
var formattedNumber = number.ToString("#,###");
Console.WriteLine(formattedNumber); // Output: 123,456,789
Check the official MS Docs for more information
https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings