You could read each command you input and save it into a .txt
file. If you are writing directly to the console you can save the string from the Console.ReadLine()
function into a variable and then write it to the historical file.
The next time you run your program, have a method that checks the .txt
file and retrieves the commands in whatever format you desire (array, line by line etc.)
This gives you flexibility as to how you manage the .txt
file as well, you can keep the historical commands from every time your program has run or just the previous execution.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…