- using System;
- public class Test {
- public static void Main(string[] args) {
- Console.WriteLine("\n{0,-10}{1,-3}", "Name", "Salary");
- Console.WriteLine("{0,-10}{1,6}", "Name1", 453344);
- Console.WriteLine("{0,-10}{1,6}", "Name2", 47890);
- }
- }
The code will shows you how to control the width and alignment in Console.WriteLine in c#.net.
