private void button3_Click(object sender, EventArgs e) { Thread thread = new Thread(() => { Tools.QuickSort(0, Tools.ButtonArray.Length - 1, int.Parse(DeleyTime.Text)); MessageBox.Show("Done"); }); thread.Start(); }