Best way to shuffle a list (C#)

Simple answer:

list = list.OrderBy( i => Guid.NewGuid() ).ToList();

Using System.Linq, it's easy to shuffle a list.

広告