mercredi 14 juin 2017

Randomly shuffling an array [duplicate]

This question already has an answer here:

What I need to do is randomly shuffle an array of 25 numbers

int[] arr = Enumerable.Range(0, 24).ToArray();

So that it still has all the numbers from 0 to 24 but in a random order. What would be the simplest way to do it?




Aucun commentaire:

Enregistrer un commentaire