Console.WriteLine method in C#

In this article, I will explain you about Console.WriteLine method in C#.
  • 6932

Introduction

A console application is the simplest form of C# program. Console programs are very easy to develop. Console programs read input and write output. For writing purpose we can use Console.WriteLine method. It is very useful console method. Console.WriteLine method writes text on the console window and adds a newline character at the end of the string. This mean any subsequent output will start from a new line.

Example

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication11

{

    class Program

    {

        static void Main()

        {

            Console.WriteLine("Uma");

            Console.WriteLine("is a");

            Console.WriteLine("Girl");

            Console.ReadLine();

        }

    }

}

The output of the following program

Clipboard213.jpg

© 2020 DotNetHeaven. All rights reserved.