title: Generating an array of random strings
body: <p>I'm trying to build a static array of randomly generated strings of a specific length. I've based what I have so far from <a href="https://stackoverflow.com/questions/1546472/generate-random-strings-in-vb-net">here</a>, but each index in the array has the same string, instead of a different strings. What am I doing wrong?</p>
  
  <pre><code>Dim Target As String
   Target = InputBox("Input target string")
  
    Dim StringArray(10) As String
          For i = 1 To 10
              StringArray(i) = GenerateString(Len(Target))
              Debug.Print(StringArray(i))
          Next
  
    Function GenerateString(size As Integer) As String
          Dim LegalCharacters As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
          Dim Rnd As New Random()
          Dim Builder As New System.Text.StringBuilder()
          Dim Ch As Char
  
          For i As Integer = 0 To size - 1
              Ch = LegalCharacters(Rnd.Next(0, LegalCharacters.Length))
              Builder.Append(Ch)
          Next
  
          Return Builder.ToString()
      End Function
  </code></pre>