+ 3

What is the difference between Write and WriteLine?

28th Sep 2016, 10:31 AM
Jayasoorya Jithendra
Jayasoorya Jithendra - avatar
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.
28th Sep 2016, 11:30 AM
Mihai Alexandru
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
1st Oct 2016, 11:36 AM
Hari
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
29th Nov 2016, 1:13 AM
julio