Coming soon - Get a detailed view of why an account is flagged as spam!
view details
3
I want to be able to stop writing something with a typewrite module I made if the enter key is pressed.
Post Flair (click to view more posts with a particular flair)
Post Body

     csharp
        static void typewrite(string text)
        {
            char[] array = text.ToCharArray();
            while ((Console.ReadKey().Key != ConsoleKey.Enter))
            {
                for (int i = 0; i < array.Length; i  )
                {
                    Console.Write(array[i]);
                    System.Threading.Thread.Sleep(100);
                }
            }
        }

Basically what I want to happen is for when the enter key is pressed the module essentially stops typing and it prints the whole statement, similar to in pokemon games.

Thanks, I hope this is made with enough effort.

Author
Account Strength
100%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
78,583
Link Karma
48,011
Comment Karma
29,939
Profile updated: 1 day ago
Posts updated: 8 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago