Make text be “typed out” effect in C#

HomeC#

Make text be “typed out” effect in C#

Case insensitive comparison in C#
How to escape braces in a format string in C#
Escape curly braces in an interpolated string in C#

We have a previous article on how to output text in a console slowly, but this article gives code to output word by word, but you might want to output the code like if it was being typed out letter by letter, to be able to accomplish this, the code has to take each letter, here’s the code to accomplish this

static void TypeSlow(string line) {
    for (int i = 0; i < line.Length; i++) {
        Console.Write(line[i]);
        System.Threading.Thread.Sleep(50); // Adjust in miliseconds how fast it should be
    }
}

COMMENTS

DISQUS: 0