Control the width

image_pdfimage_print
   
  

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

   
     


This entry was posted in Data Types. Bookmark the permalink.