I believe you're new to programming, so I'll try to explain what you want to do.
You want to store everything you type into a variable until you press X (or so I've understood).
The variable 'key' will store whatever you type once a cycle (can be anything) - meaning, key will always have a volatile value, because you are changing it everytime it reaches the readline. You append the variable 'key' to your other variable, 'alltext', that is where you have it's previous value + the new value 'key'. The cycle only ends when you enter 'x' and only 'x'. After that, it will print everything in 'alltext'.
There are many ways to do this, and working with an array is a better and cleaner way, however I'm just adapting what you wrote in a way that you can easily understand.
string key = "";
string alltext = "";
do
{
key = Console.ReadLine();
alltext += key + "\n ";
} while (key!="x");
Console.WriteLine(alltext);
Console.ReadKey();
What I'm doing with "\n" is that I'm adding a new line after that text (let the console know its a new line).
Let me know if this helps