Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.24 KB | None | 0 0
  1. var list = new List<T> ();
  2. fillList (list);
  3. var randomizedList = new List<T> ();
  4. var rnd = new Random ();
  5. while (list.Count != 0)
  6. {
  7.     var index = rnd.Next (0, list.Count);
  8.     randomizedList.Add (list [index]);
  9.     list.RemoveAt (index);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement