private void btnRandomize_Click(object sender, EventArgs e) { // https://stackoverflow.com/questions/273313/randomize-a-listt int n = results.Count; while (n > 1) { n--; int k = r.Next(n + 1); AcademicResult value = results[k]; results[k] = results[n]; results[n] = value; } ShowList(); }
public void RandomizeResults() { // https://stackoverflow.com/questions/273313/randomize-a-listt Random r = new Random(); int n = results.Count; while (n > 1) { n--; int k = r.Next(n + 1); AcademicResult value = results[k]; results[k] = results[n]; results[n] = value; } }