You can use the Fisher-Yates shuffle to produce a good random distribution of objects:
' Some things to shuffle
Dim myStrings() As String = {"One", "Two", "Three", "Four", "Five"} ' Our random number source Dim rand As New Random For i As Integer = 0 To myStrings.Length - 1 ' Pick an element to swap around Dim swapIndex As Integer = rand.Next(i, myStrings.Length) ' Switch them Dim temp As String = myStrings(i)myStrings(i) = myStrings(swapIndex)
myStrings(swapIndex) = temp
Next ' Print the results For Each str As String In myStringsConsole.WriteLine(str)
Next