title: Ordering Multidimensional arrays
body: <p>I am trying to sort a multidimensional array, but am not sure if this is the correct way to go about it. So far, I am getting my 5 numbers in the multidimensional array and then moving them into a single dimensional array and using array sort. Does know a better way ? or have ideas on how to improve mine? Also , the code currently isn't working in the sorting area, it gives me an index out of array error.  </p>
  
  <p>Any help will be appreciated. Thanks in advance</p>
  
  <pre><code>Module q
      Sub Main()
          Randomize()
          Dim Player,RandomNumber,NumberOfPlayers,Index As Integer
          Dim Roll as Integer = 0
          Console.Write("How many people will be playing Yahtzed?: ")
          Player = convert.toint32(Console.Readline)
          NumberOfPlayers = Player
          Dim Game(Player,5) As Integer
          Do until Player = 0
              Console.Write("User")
              Roll = 0
              Do until Roll = 5
                  RandomNumber = CINT(Int((6 * Rnd()) + 1))
                  Game(Player,Roll) = RandomNumber
                  Roll += 1
                  Console.Write(" "&amp;RandomNumber)
              Loop 
              Player -= 1
              Console.Writeline()
          Loop 
          Player = NumberOfPlayers
          Do until Player = 0
              Dim Ordering(5) as Integer
              Roll = 0
              Do until Roll = 5
                  Ordering(Index) = Game(Player,Roll)
                  Roll += 1
                  Index += 1
                  Array.Sort(Ordering)
              Loop
          Loop
      End Sub
  End Module
  </code></pre>