鼠标单击 - C#

时间:2017-03-02 17:39:07

标签: c#

我正在研究一个项目,我有一个写文本较慢的函数:

public static void Slow_Writing(string text)
    {
        char ch;
        for (int i = 0; i < text.Length; i++)
        {
            ch = text[i];
            Thread.Sleep(40);
            Console.Write(ch);
        }
    }

当有人在写入时点击鼠标时,它会停止。我怎样才能防止它停止运转?

0 个答案:

没有答案