private void RandomizeBtn_Click(object sender, EventArgs e) { Random rnd = new Random(); MapListBox.Lines = MapListBox.Lines.OrderBy(line => rnd.Next()).ToArray(); }