In this blog, we will see the difference between the Write and the WriteLine methods.
The Write () method outputs one or more values to the screen without a new line character.
The 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:
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System;
class Program
{
static void Main()
{
Console.Write("Box");
Console.Write("Table");
Console.Write("chair");
Console.WriteLine();
Console.WriteLine("desk");
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System;
class Program
{
static void Main()
{
Console.Write("Box");
Console.Write("Table");
Console.Write("chair");
Console.WriteLine();
Console.WriteLine("desk");
}
}
Output of the program:



Tauqueer DanishPosted Aug 1, 2019, 7:47 AM
Is there any other difference between them?
Dinesh KudalePosted Jun 15, 2019, 2:21 AM
Nice Explanation. Thank you.
Mahesh ChandPosted Sep 5, 2011, 12:03 PM
Can you upload the image again?