How to print a blank line in C#?

CsharpProgrammingServer Side Programming

To display a line in C#, use the Console.WriteLine().

Under that set a blank line −

Console.WriteLine(" ");

The following is the code that displays a blank line −

Example

 Live Demo

using System;
namespace Program {
   public class Demo {
      public static void Main(String[] args) {

         Console.WriteLine(" ");
         Console.WriteLine("Displayed a blank line above!\n");
         Console.ReadLine();

      }
   }
}

Output

Displayed a blank line above!
raja
Published on 20-Aug-2018 13:06:55
Advertisements