More
Image
Difference between Write and WriteLine Methods in C sharp
By JC.Adinarayana Reddy On 24 Jan 2017
Categories: C#.net

Write (): method outputs one or more values to the screen without a new line character.

WriteLine(): always appends a new line character to the end of the string. this means any subsequent output will start on a new line.

Example:

using System;

namespace Console_Diff_Between_Write_and_WriteLine

{

    class Program

    {

        static void Main(string[] args)

        {

            Console.Write("Box");

            Console.Write("Table");

            Console.Write("chair");

            Console.WriteLine();

            Console.WriteLine("desk");

        }

    }

}


Comments
Message :
Comments
JC.Adinarayana Reddy
.net
.net