The difference between Console.WriteLine() and Console.Write in C#

the difference

1. There can be no parameters in Console.WriteLine(), and Console.Write() cannot be without parameters 2. Console.WriteLine()
Insert picture description here
outputs to the console and wraps, and the cursor outputs the next line of the result,
Console.Write() outputs to the control Station does not wrap, and the cursor will not move to the next line

Insert picture description here
Insert picture description here

Insert picture description here

Insert picture description here

Guess you like

Origin blog.csdn.net/wangwei021933/article/details/108329463