What is different between Console.WriteLine() and Console.Write() | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 3

What is different between Console.WriteLine() and Console.Write()

Rt

21st Nov 2016, 4:48 PM
loneyor
loneyor - avatar
6 ответов
+ 14
example: console.writeline("HELLO WORLD"); console.writeline("Love C#"); output: HELLO WORLD Love C# ------------------------------ console.write("Hello world"); console.write("Love C#"); output: Hello worldLove C# ------------------------------ Summery: WriteLine add a new line in the end of sentances. Write doesnt add line at end of the santances. hope that helped
21st Nov 2016, 5:43 PM
George Rabbat
George Rabbat - avatar
+ 2
Console.WriteLine() wrote all in the (" ") in one line and then get you on new line. Console.Write() only wrote all in the (" ") and keep you on the same line.
21st Nov 2016, 5:27 PM
Peter
+ 2
Console.Write() will print the output and stay on the same line. Console.WriteLine() will print the output and then go to a new line. Example: Console.Write("Hello"); Console.Write("Jim"); OUTPUT: HelloJim ------------------------------------- Console.WriteLine("Hello"); Console.WriteLine("Jim"); OUTPUT: Hello Jim
26th Nov 2016, 12:40 PM
Jess
Jess - avatar
+ 1
console.writeline prints something then goes one line down. While console.write keeps you at the same line
27th Nov 2016, 9:09 PM
Tomashuyk Maxim
Tomashuyk Maxim - avatar
0
WriteLine() creates a new line after output, Write() does not.
1st Dec 2016, 6:54 AM
Isaac C. Weiner
- 2
write a program of 2 variable
23rd Nov 2016, 2:41 PM
Subranshu Mahakur
Subranshu Mahakur - avatar