0

Console,WriteLine and Write.

hello everyone!I am self studying c# at home...my parents or my family don't know anything about it..I hope you will help me learn better in detail.Thanks. now, what is the difference between write and WriteLine when you write a program, could you explain it to me? and should we write"console" in any program we write..or does it depend on situation and there are other things like console.. sorry, I don't know if you understood what I mean..I am a totally new to it, don't know anything too well.

10th May 2017, 5:14 AM
LôUis ToMilsøñ
LôUis ToMilsøñ - avatar
3 odpowiedzi
+ 1
Console.Write will basically write as stated. Console.Writeline, will basically write and move on to the next line for the next output or input. They can be used interchangeably depending on the need. If you are really concerned about neatness of your display then try experimenting with the two
10th May 2017, 11:19 PM
Krishneel Nair
Krishneel Nair - avatar
0
Console.Write will add the text to the line where the cursor is at and leave it on that line. Console.WriteLine will add text to the line where the cursor is at and enter a carriage return to move the cursor down to the next line. Example: Console.Write("Test "); Console.Write("Same Line"); will output as Test Same Line Console.WriteLine("Test "); Console.WriteLine("New Line"); will output as Test New Line
10th May 2017, 5:19 AM
Kevin Medeiros
Kevin Medeiros - avatar
0
thank you very much..that was really helpfull!!
10th May 2017, 5:27 AM
LôUis ToMilsøñ
LôUis ToMilsøñ - avatar