Make text be “typed out” effect in C#

HomeC#

Make text be “typed out” effect in C#

Difference between String (Uppercase s) and string (lowercase s)
Return output slowly in C#
Convert date string to DateTime object 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