Unexpected output with Console.Write

When using Console.Write with an empty string, in the Results pane a carriage return and linefeed are inserted instead. This does not happen in a Console project using Visual Studio.

LinqPad version: v5.22.00 beta

Test code:

void Main() { Console.Write("Hello"); Console.Write("|"); Console.Write("World"); Console.Write("|"); Console.Write(""); //Writing an empty string Console.Write("|"); Console.Write("Hello"); Console.Write("|"); Console.Write("World"); }

Output:
Hello|World|
|Hello|World
Expected output:
Hello|World||Hello|World
Please advise.

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!