C#循环和按键中断循环
|
我的代码包含以下内容:
{
var comeback = Cursor.Position;
code goes here
code goes here
code goes here
code goes here
code goes here
code goes here
Cursor.Position = restart;
}
现在,我希望它不断循环播放,直到我按下按键停止。
我无法为此循环编写代码,或者我应该采用其他方法处理此循环。
提前致谢
没有找到相关结果
已邀请:
3 个回复
外镶受继
坝硷操
考虑让一个线程监听按键,然后在您的程序中设置一个标志来检查循环。 例如未经测试
破弯