Format int in Console.WriteLine : int : Data Types C# Source Code


Custom Search

C# Source Code » Data Types » int »

 

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);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Data Types
» int