How to make text be “typed out” in console application?

后端 未结 3 1330
失恋的感觉
失恋的感觉 2021-01-01 05:48

Just like the way the computer does it in War Games. I\'ve started, but I don\'t know where to go from here.

static void TypeLine(string line)
{
    string o         


        
3条回答
  •  悲哀的现实
    2021-01-01 06:17

    For entering the characters with some delay as others said the best way is use Thread.Sleep(time).

    but actually there is some more details may you want to add. For example maybe you want to customize the character shown (as you can see in the video you gave us) but in a console windows there is no effect.

    Adding these effects is completely another story and that's a little complicated.

    How should I create a custom graphical console/terminal on Windows? give you a good vision for what you want ;)

提交回复
热议问题