Imports System.Collections
Module Example
Public Sub Main()
Const WORD_SIZE As Integer = 4
Dim words() As String = { "1234", "5678", "90qw", "qwer" }
Dim keys(WORD_SIZE) As Double
Dim letters(WORD_SIZE) As String
Dim rnd As New Random()
For Each word As String In words
For ctr As Integer = 0 To word.Length - 1
keys(ctr) = rnd.NextDouble()
letters(ctr) = word.Chars(ctr)
Next
Array.Sort(keys, letters, 0, WORD_SIZE, Comparer.Default)
Dim scrambledWord As String = String.Concat(letters(0), letters(1), letters(2), letters(3))
Console.WriteLine(word)
Console.WriteLine(scrambledWord)
Next
End Sub
End Module