Console automatically adding a blank space when asking for a user input

Hi sorry to bother people. I am currently having an issue where I am asking for user input and it appears to be automatically inputting a blank space into the console.

I did not type anything when I ran the code but it seems to have automatically inputted a blank space and printed it again underneath.

I took some code from a previous project which I knew worked and in the console it will let me input text into the console and doesn’t automatically enter a blank space.

Any help would be greatly appreciated.

ReadLine is taking input on the first blank line, to make it appear at the end of the prompt change the prompt to Write from WriteLine.

The second blank line is the output from nothing being entered.

If you don’t want anything output you could wrap the output in a

if (!string.IsNullOrWhiteSpace(number)) { Console.WriteLine(number); }