首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

關于“暫停”解决方法

2012-02-19 
關于“暫停”int i1while(i1){Console.WriteLine(hello)//////}我如何能實現每個1秒打印一次hello?謝

關于“暫停”
int i=1;
while(i==1)
{
  Console.WriteLine("hello");
  //////
}
我如何能實現每個1秒打印一次hello?謝謝

[解决办法]


int i=1; 
while(i==1) 

Console.WriteLine("hello"); 
Thread.Sleep(1000);
}
[解决办法]
using System.Threading;
[解决办法]
using System.Threading
[解决办法]

private void button3_Click(object sender, System.EventArgs e) 

textBox61.Text="hello"; 
Application.DoEvents();
Thread.Sleep(1000); 
textBox61.Text="hello2"; 
Application.DoEvents();
Thread.Sleep(1000); 
textBox61.Text="hello3"; 
Application.DoEvents();


}//button3_Click 

热点排行