Kyl*_*yle 4 c# infinite-loop winforms
我的代码包含这样的内容:
{
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;
}
Run Code Online (Sandbox Code Playgroud)
现在,我希望这个循环不断循环,直到我调用一个按键停止.
我不能做什么我写这个循环的代码,或者我应该采取不同的方式来解决这个问题.
提前致谢
while(!Console.KeyAvailable)
{
//do work
}
Run Code Online (Sandbox Code Playgroud)