Control the width : String Format : Data Types C# Source Code


Custom Search

C# Source Code » Data Types » String Format »

 

Control the width








    
 

using System;
public class TestConsoleApp {
    public static void Main(string[] args) {
        Console.WriteLine("\n{0,-10}{1,-3}", "Name", "Salary");
        Console.WriteLine("{0,-10}{1,6}", "Bill", 123456);
        Console.WriteLine("{0,-10}{1,6}", "Polly", 7890);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Data Types
» String Format