Format int in Console.WriteLine
using System; public class TestConsoleApp { public static void Main(string[] args) { Console.WriteLine(123); Console.WriteLine("{0}", 123); Console.WriteLine("{0:D3}", 123); } }