private void button19_Click(object sender, EventArgs e) { Thread thread = new Thread(() => { Tools.BubbleSort2(arr.Length); MessageBox.Show("Done"); }); thread.Start(); }