C# 任务 数据加载不影响其他操作
private void button1_Click(object sender, EventArgs e) { //this.timer1.Enabled = true; Task t1 = new Task(set); t1.Start(); } public void set() { while (true) { Thread.Sleep(1000); this.textBox2.Text = DateTime.Now.ToString("ffffff"); } }