+ 3
What is the difference between Write and WriteLine?
3 Answers
+ 8
WriteLine method will print result and move cursor to the next line.While, Write method print result and cursor remain at same line.
0
write line is used to print the given message on console screen and the cursor position will comes to the next line.
write also will print the given message on the console screen but the cursor position will be on the same line
0
writeline starts a new line.
write continues a line.
Console.WriteLine("a");
Console.WriteLine("b");
/* outputs
a
b */
Console.Write("a");
Console.Write("b");
// outputs ab